[FA-misc] Switches to using DTOs, updates frontend with details and reader page, updates novel import to be an upsert
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FictionArchive.Service.NovelService.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FAmisc_NovelConstraint : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Chapter_Novels_NovelId",
|
||||
table: "Chapter");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "NovelId",
|
||||
table: "Chapter",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Novels_ExternalId_SourceId",
|
||||
table: "Novels",
|
||||
columns: new[] { "ExternalId", "SourceId" },
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Chapter_Novels_NovelId",
|
||||
table: "Chapter",
|
||||
column: "NovelId",
|
||||
principalTable: "Novels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Chapter_Novels_NovelId",
|
||||
table: "Chapter");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Novels_ExternalId_SourceId",
|
||||
table: "Novels");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "NovelId",
|
||||
table: "Chapter",
|
||||
type: "bigint",
|
||||
nullable: true,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Chapter_Novels_NovelId",
|
||||
table: "Chapter",
|
||||
column: "NovelId",
|
||||
principalTable: "Novels",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user