divan/RMuseum/Migrations/20210701144846_SingerImage.cs
Anas Rashid 532d005cdb Rename Ganjoor -> Divan throughout the code
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>
2026-10-04 23:49:01 +02:00

46 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace RMuseum.Migrations
{
public partial class SingerImage : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "RImageId",
table: "DivanSingers",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_DivanSingers_RImageId",
table: "DivanSingers",
column: "RImageId");
migrationBuilder.AddForeignKey(
name: "FK_DivanSingers_GeneralImages_RImageId",
table: "DivanSingers",
column: "RImageId",
principalTable: "GeneralImages",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DivanSingers_GeneralImages_RImageId",
table: "DivanSingers");
migrationBuilder.DropIndex(
name: "IX_DivanSingers_RImageId",
table: "DivanSingers");
migrationBuilder.DropColumn(
name: "RImageId",
table: "DivanSingers");
}
}
}