mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-30 16:04:16 +02:00
Change PrimaryKey of MetadataEntry to Fetcher + Identifier
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations.pgsql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class MetadataEntryPrimaryKeyChange : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MetadataEntries",
|
||||
table: "MetadataEntries");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_MetadataEntries_MetadataFetcherName",
|
||||
table: "MetadataEntries");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MetadataEntries",
|
||||
table: "MetadataEntries",
|
||||
columns: new[] { "MetadataFetcherName", "Identifier" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MetadataEntries_MangaId",
|
||||
table: "MetadataEntries",
|
||||
column: "MangaId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MetadataEntries",
|
||||
table: "MetadataEntries");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_MetadataEntries_MangaId",
|
||||
table: "MetadataEntries");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MetadataEntries",
|
||||
table: "MetadataEntries",
|
||||
columns: new[] { "MangaId", "MetadataFetcherName" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MetadataEntries_MetadataFetcherName",
|
||||
table: "MetadataEntries",
|
||||
column: "MetadataFetcherName");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user