using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.MySql.Migrations
{
///
public partial class Initial : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ChannelWatermark",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Mode = table.Column(type: "int", nullable: false),
ImageSource = table.Column(type: "int", nullable: false),
Image = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Location = table.Column(type: "int", nullable: false),
Size = table.Column(type: "int", nullable: false),
WidthPercent = table.Column(type: "int", nullable: false),
HorizontalMarginPercent = table.Column(type: "int", nullable: false),
VerticalMarginPercent = table.Column(type: "int", nullable: false),
FrequencyMinutes = table.Column(type: "int", nullable: false),
DurationSeconds = table.Column(type: "int", nullable: false),
Opacity = table.Column(type: "int", nullable: false),
PlaceWithinSourceContent = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ChannelWatermark", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Collection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
UseCustomPlaybackOrder = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Collection", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ConfigElement",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Key = table.Column(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Value = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_ConfigElement", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyCollection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Etag = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyCollection", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinCollection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Etag = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinCollection", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LanguageCode",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ThreeCode1 = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ThreeCode2 = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TwoCode = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EnglishName = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
FrenchName = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_LanguageCode", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MediaSource",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
},
constraints: table =>
{
table.PrimaryKey("PK_MediaSource", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MultiCollection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_MultiCollection", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ProgramSchedule",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
KeepMultiPartEpisodesTogether = table.Column(type: "tinyint(1)", nullable: false),
TreatCollectionsAsShows = table.Column(type: "tinyint(1)", nullable: false),
ShuffleScheduleItems = table.Column(type: "tinyint(1)", nullable: false),
RandomStartPoint = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProgramSchedule", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Resolution",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsCustom = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false),
Height = table.Column(type: "int", nullable: false),
Width = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Resolution", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "SmartCollection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Query = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_SmartCollection", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TraktList",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
TraktId = table.Column(type: "int", nullable: false),
User = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
List = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ItemCount = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TraktList", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyMediaSource",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ServerName = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
OperatingSystem = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LastCollectionsScan = table.Column(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyMediaSource", x => x.Id);
table.ForeignKey(
name: "FK_EmbyMediaSource_MediaSource_Id",
column: x => x.Id,
principalTable: "MediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinMediaSource",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ServerName = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
OperatingSystem = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinMediaSource", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinMediaSource_MediaSource_Id",
column: x => x.Id,
principalTable: "MediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Library",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MediaKind = table.Column(type: "int", nullable: false),
LastScan = table.Column(type: "datetime(6)", nullable: true),
MediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Library", x => x.Id);
table.ForeignKey(
name: "FK_Library_MediaSource_MediaSourceId",
column: x => x.MediaSourceId,
principalTable: "MediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LocalMediaSource",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LocalMediaSource", x => x.Id);
table.ForeignKey(
name: "FK_LocalMediaSource_MediaSource_Id",
column: x => x.Id,
principalTable: "MediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PlexMediaSource",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ServerName = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ProductVersion = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Platform = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PlatformVersion = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ClientIdentifier = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PlexMediaSource", x => x.Id);
table.ForeignKey(
name: "FK_PlexMediaSource_MediaSource_Id",
column: x => x.Id,
principalTable: "MediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MultiCollectionItem",
columns: table => new
{
MultiCollectionId = table.Column(type: "int", nullable: false),
CollectionId = table.Column(type: "int", nullable: false),
ScheduleAsGroup = table.Column(type: "tinyint(1)", nullable: false),
PlaybackOrder = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MultiCollectionItem", x => new { x.MultiCollectionId, x.CollectionId });
table.ForeignKey(
name: "FK_MultiCollectionItem_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MultiCollectionItem_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "FFmpegProfile",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ThreadCount = table.Column(type: "int", nullable: false),
HardwareAcceleration = table.Column(type: "int", nullable: false),
VaapiDriver = table.Column(type: "int", nullable: false),
VaapiDevice = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
QsvExtraHardwareFrames = table.Column(type: "int", nullable: true),
ResolutionId = table.Column(type: "int", nullable: false),
VideoFormat = table.Column(type: "int", nullable: false),
BitDepth = table.Column(type: "int", nullable: false),
VideoBitrate = table.Column(type: "int", nullable: false),
VideoBufferSize = table.Column(type: "int", nullable: false),
AudioFormat = table.Column(type: "int", nullable: false),
AudioBitrate = table.Column(type: "int", nullable: false),
AudioBufferSize = table.Column(type: "int", nullable: false),
NormalizeLoudness = table.Column(type: "tinyint(1)", nullable: false),
AudioChannels = table.Column(type: "int", nullable: false),
AudioSampleRate = table.Column(type: "int", nullable: false),
NormalizeFramerate = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false),
DeinterlaceVideo = table.Column(type: "tinyint(1)", nullable: true, defaultValue: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FFmpegProfile", x => x.Id);
table.ForeignKey(
name: "FK_FFmpegProfile_Resolution_ResolutionId",
column: x => x.ResolutionId,
principalTable: "Resolution",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MultiCollectionSmartItem",
columns: table => new
{
MultiCollectionId = table.Column(type: "int", nullable: false),
SmartCollectionId = table.Column(type: "int", nullable: false),
ScheduleAsGroup = table.Column(type: "tinyint(1)", nullable: false),
PlaybackOrder = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MultiCollectionSmartItem", x => new { x.MultiCollectionId, x.SmartCollectionId });
table.ForeignKey(
name: "FK_MultiCollectionSmartItem_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MultiCollectionSmartItem_SmartCollection_SmartCollectionId",
column: x => x.SmartCollectionId,
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyConnection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Address = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EmbyMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyConnection", x => x.Id);
table.ForeignKey(
name: "FK_EmbyConnection_EmbyMediaSource_EmbyMediaSourceId",
column: x => x.EmbyMediaSourceId,
principalTable: "EmbyMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyPathReplacement",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
EmbyPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LocalPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EmbyMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyPathReplacement", x => x.Id);
table.ForeignKey(
name: "FK_EmbyPathReplacement_EmbyMediaSource_EmbyMediaSourceId",
column: x => x.EmbyMediaSourceId,
principalTable: "EmbyMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinConnection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Address = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
JellyfinMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinConnection", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinConnection_JellyfinMediaSource_JellyfinMediaSourceId",
column: x => x.JellyfinMediaSourceId,
principalTable: "JellyfinMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinPathReplacement",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
JellyfinPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LocalPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
JellyfinMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinPathReplacement", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinPathReplacement_JellyfinMediaSource_JellyfinMediaSou~",
column: x => x.JellyfinMediaSourceId,
principalTable: "JellyfinMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyLibrary",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ShouldSyncItems = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyLibrary", x => x.Id);
table.ForeignKey(
name: "FK_EmbyLibrary_Library_Id",
column: x => x.Id,
principalTable: "Library",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinLibrary",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ShouldSyncItems = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinLibrary", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinLibrary_Library_Id",
column: x => x.Id,
principalTable: "Library",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LibraryPath",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Path = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LastScan = table.Column(type: "datetime(6)", nullable: true),
LibraryId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LibraryPath", x => x.Id);
table.ForeignKey(
name: "FK_LibraryPath_Library_LibraryId",
column: x => x.LibraryId,
principalTable: "Library",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LocalLibrary",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LocalLibrary", x => x.Id);
table.ForeignKey(
name: "FK_LocalLibrary_Library_Id",
column: x => x.Id,
principalTable: "Library",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PlexLibrary",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
Key = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ShouldSyncItems = table.Column(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexLibrary", x => x.Id);
table.ForeignKey(
name: "FK_PlexLibrary_Library_Id",
column: x => x.Id,
principalTable: "Library",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PlexConnection",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IsActive = table.Column(type: "tinyint(1)", nullable: false),
Uri = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PlexMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexConnection", x => x.Id);
table.ForeignKey(
name: "FK_PlexConnection_PlexMediaSource_PlexMediaSourceId",
column: x => x.PlexMediaSourceId,
principalTable: "PlexMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "PlexPathReplacement",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
PlexPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LocalPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PlexMediaSourceId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexPathReplacement", x => x.Id);
table.ForeignKey(
name: "FK_PlexPathReplacement_PlexMediaSource_PlexMediaSourceId",
column: x => x.PlexMediaSourceId,
principalTable: "PlexMediaSource",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyPathInfo",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Path = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NetworkPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EmbyLibraryId = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyPathInfo", x => x.Id);
table.ForeignKey(
name: "FK_EmbyPathInfo_EmbyLibrary_EmbyLibraryId",
column: x => x.EmbyLibraryId,
principalTable: "EmbyLibrary",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinPathInfo",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Path = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NetworkPath = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
JellyfinLibraryId = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinPathInfo", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinPathInfo_JellyfinLibrary_JellyfinLibraryId",
column: x => x.JellyfinLibraryId,
principalTable: "JellyfinLibrary",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "LibraryFolder",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Path = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LibraryPathId = table.Column(type: "int", nullable: false),
Etag = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_LibraryFolder", x => x.Id);
table.ForeignKey(
name: "FK_LibraryFolder_LibraryPath_LibraryPathId",
column: x => x.LibraryPathId,
principalTable: "LibraryPath",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MediaItem",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
LibraryPathId = table.Column(type: "int", nullable: false),
State = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MediaItem", x => x.Id);
table.ForeignKey(
name: "FK_MediaItem_LibraryPath_LibraryPathId",
column: x => x.LibraryPathId,
principalTable: "LibraryPath",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Artist",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Artist", x => x.Id);
table.ForeignKey(
name: "FK_Artist_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CollectionItem",
columns: table => new
{
CollectionId = table.Column(type: "int", nullable: false),
MediaItemId = table.Column(type: "int", nullable: false),
CustomIndex = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CollectionItem", x => new { x.CollectionId, x.MediaItemId });
table.ForeignKey(
name: "FK_CollectionItem_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CollectionItem_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "FillerPreset",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
FillerKind = table.Column(type: "int", nullable: false),
FillerMode = table.Column(type: "int", nullable: false),
Duration = table.Column(type: "time(6)", nullable: true),
Count = table.Column(type: "int", nullable: true),
PadToNearestMinute = table.Column(type: "int", nullable: true),
AllowWatermarks = table.Column(type: "tinyint(1)", nullable: false),
CollectionType = table.Column(type: "int", nullable: false),
CollectionId = table.Column(type: "int", nullable: true),
MediaItemId = table.Column(type: "int", nullable: true),
MultiCollectionId = table.Column(type: "int", nullable: true),
SmartCollectionId = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FillerPreset", x => x.Id);
table.ForeignKey(
name: "FK_FillerPreset_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_FillerPreset_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_FillerPreset_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_FillerPreset_SmartCollection_SmartCollectionId",
column: x => x.SmartCollectionId,
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Movie",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Movie", x => x.Id);
table.ForeignKey(
name: "FK_Movie_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "OtherVideo",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OtherVideo", x => x.Id);
table.ForeignKey(
name: "FK_OtherVideo_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Show",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Show", x => x.Id);
table.ForeignKey(
name: "FK_Show_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Song",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Song", x => x.Id);
table.ForeignKey(
name: "FK_Song_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TraktListItem",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
TraktListId = table.Column(type: "int", nullable: false),
Kind = table.Column(type: "int", nullable: false),
TraktId = table.Column(type: "int", nullable: false),
Rank = table.Column(type: "int", nullable: false),
Title = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Year = table.Column(type: "int", nullable: true),
Season = table.Column(type: "int", nullable: true),
Episode = table.Column(type: "int", nullable: true),
MediaItemId = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TraktListItem", x => x.Id);
table.ForeignKey(
name: "FK_TraktListItem_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_TraktListItem_TraktList_TraktListId",
column: x => x.TraktListId,
principalTable: "TraktList",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ArtistMetadata",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Disambiguation = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Biography = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Formed = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ArtistId = table.Column(type: "int", nullable: false),
MetadataKind = table.Column(type: "int", nullable: false),
Title = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
OriginalTitle = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SortTitle = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Year = table.Column(type: "int", nullable: true),
ReleaseDate = table.Column(type: "datetime(6)", nullable: true),
DateAdded = table.Column(type: "datetime(6)", nullable: false),
DateUpdated = table.Column(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ArtistMetadata", x => x.Id);
table.ForeignKey(
name: "FK_ArtistMetadata_Artist_ArtistId",
column: x => x.ArtistId,
principalTable: "Artist",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MusicVideo",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ArtistId = table.Column(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MusicVideo", x => x.Id);
table.ForeignKey(
name: "FK_MusicVideo_Artist_ArtistId",
column: x => x.ArtistId,
principalTable: "Artist",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MusicVideo_MediaItem_Id",
column: x => x.Id,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Channel",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UniqueId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Number = table.Column(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Group = table.Column(type: "longtext", nullable: false, defaultValue: "ErsatzTV")
.Annotation("MySql:CharSet", "utf8mb4"),
Categories = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
FFmpegProfileId = table.Column(type: "int", nullable: false),
WatermarkId = table.Column(type: "int", nullable: true),
FallbackFillerId = table.Column(type: "int", nullable: true),
StreamingMode = table.Column(type: "int", nullable: false),
PreferredAudioLanguageCode = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PreferredAudioTitle = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PreferredSubtitleLanguageCode = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SubtitleMode = table.Column(type: "int", nullable: false),
MusicVideoCreditsMode = table.Column(type: "int", nullable: false),
MusicVideoCreditsTemplate = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_Channel", x => x.Id);
table.ForeignKey(
name: "FK_Channel_ChannelWatermark_WatermarkId",
column: x => x.WatermarkId,
principalTable: "ChannelWatermark",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_Channel_FFmpegProfile_FFmpegProfileId",
column: x => x.FFmpegProfileId,
principalTable: "FFmpegProfile",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Channel_FillerPreset_FallbackFillerId",
column: x => x.FallbackFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ProgramScheduleItem",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Index = table.Column(type: "int", nullable: false),
StartTime = table.Column(type: "time(6)", nullable: true),
CollectionType = table.Column(type: "int", nullable: false),
GuideMode = table.Column(type: "int", nullable: false),
CustomTitle = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ProgramScheduleId = table.Column(type: "int", nullable: false),
CollectionId = table.Column(type: "int", nullable: true),
MediaItemId = table.Column(type: "int", nullable: true),
MultiCollectionId = table.Column(type: "int", nullable: true),
SmartCollectionId = table.Column(type: "int", nullable: true),
PlaybackOrder = table.Column(type: "int", nullable: false),
PreRollFillerId = table.Column(type: "int", nullable: true),
MidRollFillerId = table.Column(type: "int", nullable: true),
PostRollFillerId = table.Column(type: "int", nullable: true),
TailFillerId = table.Column(type: "int", nullable: true),
FallbackFillerId = table.Column(type: "int", nullable: true),
WatermarkId = table.Column(type: "int", nullable: true),
PreferredAudioLanguageCode = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PreferredAudioTitle = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PreferredSubtitleLanguageCode = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SubtitleMode = table.Column(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProgramScheduleItem", x => x.Id);
table.ForeignKey(
name: "FK_ProgramScheduleItem_ChannelWatermark_WatermarkId",
column: x => x.WatermarkId,
principalTable: "ChannelWatermark",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_Collection_CollectionId",
column: x => x.CollectionId,
principalTable: "Collection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProgramScheduleItem_FillerPreset_FallbackFillerId",
column: x => x.FallbackFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_FillerPreset_MidRollFillerId",
column: x => x.MidRollFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_FillerPreset_PostRollFillerId",
column: x => x.PostRollFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_FillerPreset_PreRollFillerId",
column: x => x.PreRollFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_FillerPreset_TailFillerId",
column: x => x.TailFillerId,
principalTable: "FillerPreset",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
table.ForeignKey(
name: "FK_ProgramScheduleItem_MediaItem_MediaItemId",
column: x => x.MediaItemId,
principalTable: "MediaItem",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProgramScheduleItem_MultiCollection_MultiCollectionId",
column: x => x.MultiCollectionId,
principalTable: "MultiCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProgramScheduleItem_ProgramSchedule_ProgramScheduleId",
column: x => x.ProgramScheduleId,
principalTable: "ProgramSchedule",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProgramScheduleItem_SmartCollection_SmartCollectionId",
column: x => x.SmartCollectionId,
principalTable: "SmartCollection",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmbyMovie",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Etag = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_EmbyMovie", x => x.Id);
table.ForeignKey(
name: "FK_EmbyMovie_Movie_Id",
column: x => x.Id,
principalTable: "Movie",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "JellyfinMovie",
columns: table => new
{
Id = table.Column(type: "int", nullable: false),
ItemId = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Etag = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_JellyfinMovie", x => x.Id);
table.ForeignKey(
name: "FK_JellyfinMovie_Movie_Id",
column: x => x.Id,
principalTable: "Movie",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MovieMetadata",
columns: table => new
{
Id = table.Column(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ContentRating = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Outline = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Plot = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Tagline = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MovieId = table.Column(type: "int", nullable: false),
MetadataKind = table.Column(type: "int", nullable: false),
Title = table.Column(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
OriginalTitle = table.Column