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>
53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace RMuseum.Migrations
|
|
{
|
|
public partial class DivanUserBookmarkRemoveVerseIdDep : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_DivanUserBookmarks_UserId_PoemId_VerseId",
|
|
table: "DivanUserBookmarks");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "VerseId",
|
|
table: "DivanUserBookmarks",
|
|
type: "int",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "int");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_DivanUserBookmarks_UserId_PoemId_VerseId",
|
|
table: "DivanUserBookmarks",
|
|
columns: new[] { "UserId", "PoemId", "VerseId" },
|
|
unique: true,
|
|
filter: "[VerseId] IS NOT NULL");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_DivanUserBookmarks_UserId_PoemId_VerseId",
|
|
table: "DivanUserBookmarks");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "VerseId",
|
|
table: "DivanUserBookmarks",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "int",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_DivanUserBookmarks_UserId_PoemId_VerseId",
|
|
table: "DivanUserBookmarks",
|
|
columns: new[] { "UserId", "PoemId", "VerseId" },
|
|
unique: true);
|
|
}
|
|
}
|
|
}
|