Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files, folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*). External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed consistently (no pending model changes); requires a fresh database. Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
81 lines
2.4 KiB
C#
81 lines
2.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace RMuseum.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class CatFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "BookName",
|
|
table: "DivanCategories",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "MapName",
|
|
table: "DivanCategories",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "RImageId",
|
|
table: "DivanCategories",
|
|
type: "uniqueidentifier",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "SumUpSubsGeoLocations",
|
|
table: "DivanCategories",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_DivanCategories_RImageId",
|
|
table: "DivanCategories",
|
|
column: "RImageId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_DivanCategories_GeneralImages_RImageId",
|
|
table: "DivanCategories",
|
|
column: "RImageId",
|
|
principalTable: "GeneralImages",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_DivanCategories_GeneralImages_RImageId",
|
|
table: "DivanCategories");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_DivanCategories_RImageId",
|
|
table: "DivanCategories");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BookName",
|
|
table: "DivanCategories");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MapName",
|
|
table: "DivanCategories");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RImageId",
|
|
table: "DivanCategories");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "SumUpSubsGeoLocations",
|
|
table: "DivanCategories");
|
|
}
|
|
}
|
|
}
|