mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 03:48:19 +02:00
259 lines
8.5 KiB
C#
259 lines
8.5 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace API.Migrations.Manga
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class KeyLengthChange : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaId",
|
|
table: "MetadataEntries",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaIds",
|
|
table: "MangaTagToManga",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Mangas",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "MangaConnectorToManga",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "MangaConnectorToChapter",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaKey",
|
|
table: "Link",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Link",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "FileLibraries",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Chapters",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaIds",
|
|
table: "AuthorToManga",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "AuthorIds",
|
|
table: "AuthorToManga",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Authors",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaKey",
|
|
table: "AltTitle",
|
|
type: "character varying(64)",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "AltTitle",
|
|
type: "character varying(64)",
|
|
maxLength: 64,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaId",
|
|
table: "MetadataEntries",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaIds",
|
|
table: "MangaTagToManga",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Mangas",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "MangaConnectorToManga",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "MangaConnectorToChapter",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaKey",
|
|
table: "Link",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Link",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "FileLibraries",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Chapters",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaIds",
|
|
table: "AuthorToManga",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "AuthorIds",
|
|
table: "AuthorToManga",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "Authors",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "MangaKey",
|
|
table: "AltTitle",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Key",
|
|
table: "AltTitle",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(64)",
|
|
oldMaxLength: 64);
|
|
}
|
|
}
|
|
}
|