divan/RMuseum/Migrations/20240504075732_PaperSources.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

70 lines
2.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RMuseum.Migrations
{
/// <inheritdoc />
public partial class PaperSources : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "HumanReviewed",
table: "PinterestLinks",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "SuggestedByMachine",
table: "PDFDivanLinks",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "DivanPaperSources",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DivanPoetId = table.Column<int>(type: "int", nullable: false),
DivanCatId = table.Column<int>(type: "int", nullable: false),
DivanCatFullTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
DivanCatFullUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
BookType = table.Column<int>(type: "int", nullable: false),
BookFullUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
NaskbanBookId = table.Column<int>(type: "int", nullable: false),
BookFullTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsTextOriginalSource = table.Column<bool>(type: "bit", nullable: false),
CoverThumbnailImageUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
MatchPercent = table.Column<int>(type: "int", nullable: false),
HumanReviewed = table.Column<bool>(type: "bit", nullable: false),
OrderIndicator = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DivanPaperSources", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DivanPaperSources");
migrationBuilder.DropColumn(
name: "HumanReviewed",
table: "PinterestLinks");
migrationBuilder.DropColumn(
name: "SuggestedByMachine",
table: "PDFDivanLinks");
}
}
}