divan/RMuseum/Migrations/20240107100913_UserPoemQuotes.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

121 lines
3.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
/// <inheritdoc />
public partial class UserPoemQuotes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Rejected",
table: "DivanQuotedPoems",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "ReviewDate",
table: "DivanQuotedPoems",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ReviewNote",
table: "DivanQuotedPoems",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "ReviewerUserId",
table: "DivanQuotedPoems",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "SuggestedById",
table: "DivanQuotedPoems",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "SuggestionDate",
table: "DivanQuotedPoems",
type: "datetime2",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_DivanQuotedPoems_ReviewerUserId",
table: "DivanQuotedPoems",
column: "ReviewerUserId");
migrationBuilder.CreateIndex(
name: "IX_DivanQuotedPoems_SuggestedById",
table: "DivanQuotedPoems",
column: "SuggestedById");
migrationBuilder.AddForeignKey(
name: "FK_DivanQuotedPoems_AspNetUsers_ReviewerUserId",
table: "DivanQuotedPoems",
column: "ReviewerUserId",
principalTable: "AspNetUsers",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_DivanQuotedPoems_AspNetUsers_SuggestedById",
table: "DivanQuotedPoems",
column: "SuggestedById",
principalTable: "AspNetUsers",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DivanQuotedPoems_AspNetUsers_ReviewerUserId",
table: "DivanQuotedPoems");
migrationBuilder.DropForeignKey(
name: "FK_DivanQuotedPoems_AspNetUsers_SuggestedById",
table: "DivanQuotedPoems");
migrationBuilder.DropIndex(
name: "IX_DivanQuotedPoems_ReviewerUserId",
table: "DivanQuotedPoems");
migrationBuilder.DropIndex(
name: "IX_DivanQuotedPoems_SuggestedById",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "Rejected",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "ReviewDate",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "ReviewNote",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "ReviewerUserId",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "SuggestedById",
table: "DivanQuotedPoems");
migrationBuilder.DropColumn(
name: "SuggestionDate",
table: "DivanQuotedPoems");
}
}
}