diff --git a/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.Designer.cs b/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.Designer.cs
new file mode 100644
index 000000000..e0ca84108
--- /dev/null
+++ b/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.Designer.cs
@@ -0,0 +1,535 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Ombi.Store.Context.MySql;
+
+#nullable disable
+
+namespace Ombi.Store.Migrations.ExternalMySql
+{
+ [DbContext(typeof(ExternalMySqlContext))]
+ [Migration("20220407114744_PlexIds")]
+ partial class PlexIds
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "6.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("Ombi.Store.Entities.CouchPotatoCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("CouchPotatoCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("EmbyId")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("ProviderId")
+ .HasColumnType("longtext");
+
+ b.Property("Quality")
+ .HasColumnType("longtext");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TvDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("Url")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("EmbyContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("EmbyId")
+ .HasColumnType("longtext");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("ParentId")
+ .HasColumnType("varchar(255)");
+
+ b.Property("ProviderId")
+ .HasColumnType("longtext");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TvDbId")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("EmbyEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("JellyfinId")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.Property("ProviderId")
+ .HasColumnType("longtext");
+
+ b.Property("Quality")
+ .HasColumnType("longtext");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TvDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("Url")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("JellyfinContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("JellyfinId")
+ .HasColumnType("longtext");
+
+ b.Property("ParentId")
+ .HasColumnType("varchar(255)");
+
+ b.Property("ProviderId")
+ .HasColumnType("longtext");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TvDbId")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("JellyfinEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.LidarrAlbumCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ArtistId")
+ .HasColumnType("int");
+
+ b.Property("ForeignAlbumId")
+ .HasColumnType("longtext");
+
+ b.Property("Monitored")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("PercentOfTracks")
+ .HasColumnType("decimal(65,30)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TrackCount")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("LidarrAlbumCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.LidarrArtistCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("ArtistId")
+ .HasColumnType("int");
+
+ b.Property("ArtistName")
+ .HasColumnType("longtext");
+
+ b.Property("ForeignArtistId")
+ .HasColumnType("longtext");
+
+ b.Property("Monitored")
+ .HasColumnType("tinyint(1)");
+
+ b.HasKey("Id");
+
+ b.ToTable("LidarrArtistCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("GrandparentKey")
+ .HasColumnType("varchar(255)");
+
+ b.Property("Key")
+ .HasColumnType("longtext");
+
+ b.Property("ParentKey")
+ .HasColumnType("longtext");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GrandparentKey");
+
+ b.ToTable("PlexEpisode");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("ParentKey")
+ .HasColumnType("longtext");
+
+ b.Property("PlexContentId")
+ .HasColumnType("longtext");
+
+ b.Property("PlexServerContentId")
+ .HasColumnType("int");
+
+ b.Property("SeasonKey")
+ .HasColumnType("longtext");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PlexServerContentId");
+
+ b.ToTable("PlexSeasonsContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ImdbId")
+ .HasColumnType("longtext");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.Property("Quality")
+ .HasColumnType("longtext");
+
+ b.Property("ReleaseYear")
+ .HasColumnType("longtext");
+
+ b.Property("RequestId")
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.Property("TvDbId")
+ .HasColumnType("longtext");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("Url")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("PlexServerContent");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RadarrCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("Has4K")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("HasFile")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("HasRegular")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("RadarrCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SickRageCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SickRageCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SickRageEpisodeCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SickRageEpisodeCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SonarrCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("TheMovieDbId")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SonarrCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.SonarrEpisodeCache", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("HasFile")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("MovieDbId")
+ .HasColumnType("int");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("TvDbId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("SonarrEpisodeCache");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.EmbyContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("ParentId")
+ .HasPrincipalKey("EmbyId");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.JellyfinContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("ParentId")
+ .HasPrincipalKey("JellyfinId");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexEpisode", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
+ .WithMany("Episodes")
+ .HasForeignKey("GrandparentKey")
+ .HasPrincipalKey("Key");
+
+ b.Navigation("Series");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexSeasonsContent", b =>
+ {
+ b.HasOne("Ombi.Store.Entities.PlexServerContent", null)
+ .WithMany("Seasons")
+ .HasForeignKey("PlexServerContentId");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.EmbyContent", b =>
+ {
+ b.Navigation("Episodes");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.JellyfinContent", b =>
+ {
+ b.Navigation("Episodes");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.PlexServerContent", b =>
+ {
+ b.Navigation("Episodes");
+
+ b.Navigation("Seasons");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.cs b/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.cs
new file mode 100644
index 000000000..826260c93
--- /dev/null
+++ b/src/Ombi.Store/Migrations/ExternalMySql/20220407114744_PlexIds.cs
@@ -0,0 +1,176 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Ombi.Store.Migrations.ExternalMySql
+{
+ public partial class PlexIds : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_PlexEpisode_PlexServerContent_GrandparentKey",
+ table: "PlexEpisode");
+
+ migrationBuilder.AlterColumn(
+ name: "Key",
+ table: "PlexServerContent",
+ type: "varchar(255)",
+ nullable: false,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "SeasonKey",
+ table: "PlexSeasonsContent",
+ type: "longtext",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "PlexContentId",
+ table: "PlexSeasonsContent",
+ type: "longtext",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "ParentKey",
+ table: "PlexSeasonsContent",
+ type: "longtext",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "ParentKey",
+ table: "PlexEpisode",
+ type: "longtext",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "Key",
+ table: "PlexEpisode",
+ type: "longtext",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "GrandparentKey",
+ table: "PlexEpisode",
+ type: "varchar(255)",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int")
+ .Annotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_PlexEpisode_PlexServerContent_GrandparentKey",
+ table: "PlexEpisode",
+ column: "GrandparentKey",
+ principalTable: "PlexServerContent",
+ principalColumn: "Key");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_PlexEpisode_PlexServerContent_GrandparentKey",
+ table: "PlexEpisode");
+
+ migrationBuilder.AlterColumn(
+ name: "Key",
+ table: "PlexServerContent",
+ type: "int",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "varchar(255)")
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "SeasonKey",
+ table: "PlexSeasonsContent",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "longtext",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "PlexContentId",
+ table: "PlexSeasonsContent",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "longtext",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "ParentKey",
+ table: "PlexSeasonsContent",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "longtext",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "ParentKey",
+ table: "PlexEpisode",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "longtext",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "Key",
+ table: "PlexEpisode",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "longtext",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AlterColumn(
+ name: "GrandparentKey",
+ table: "PlexEpisode",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(string),
+ oldType: "varchar(255)",
+ oldNullable: true)
+ .OldAnnotation("MySql:CharSet", "utf8mb4");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_PlexEpisode_PlexServerContent_GrandparentKey",
+ table: "PlexEpisode",
+ column: "GrandparentKey",
+ principalTable: "PlexServerContent",
+ principalColumn: "Key",
+ onDelete: ReferentialAction.Cascade);
+ }
+ }
+}
diff --git a/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs b/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
index b75c45665..f55793b72 100644
--- a/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
+++ b/src/Ombi.Store/Migrations/ExternalMySql/ExternalMySqlContextModelSnapshot.cs
@@ -276,14 +276,14 @@ namespace Ombi.Store.Migrations.ExternalMySql
b.Property("EpisodeNumber")
.HasColumnType("int");
- b.Property("GrandparentKey")
- .HasColumnType("int");
+ b.Property("GrandparentKey")
+ .HasColumnType("varchar(255)");
- b.Property("Key")
- .HasColumnType("int");
+ b.Property("Key")
+ .HasColumnType("longtext");
- b.Property("ParentKey")
- .HasColumnType("int");
+ b.Property("ParentKey")
+ .HasColumnType("longtext");
b.Property("SeasonNumber")
.HasColumnType("int");
@@ -304,17 +304,17 @@ namespace Ombi.Store.Migrations.ExternalMySql
.ValueGeneratedOnAdd()
.HasColumnType("int");
- b.Property("ParentKey")
- .HasColumnType("int");
+ b.Property("ParentKey")
+ .HasColumnType("longtext");
- b.Property("PlexContentId")
- .HasColumnType("int");
+ b.Property("PlexContentId")
+ .HasColumnType("longtext");
b.Property("PlexServerContentId")
.HasColumnType("int");
- b.Property("SeasonKey")
- .HasColumnType("int");
+ b.Property("SeasonKey")
+ .HasColumnType("longtext");
b.Property("SeasonNumber")
.HasColumnType("int");
@@ -341,8 +341,9 @@ namespace Ombi.Store.Migrations.ExternalMySql
b.Property("ImdbId")
.HasColumnType("longtext");
- b.Property("Key")
- .HasColumnType("int");
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
b.Property("Quality")
.HasColumnType("longtext");
@@ -498,9 +499,7 @@ namespace Ombi.Store.Migrations.ExternalMySql
b.HasOne("Ombi.Store.Entities.PlexServerContent", "Series")
.WithMany("Episodes")
.HasForeignKey("GrandparentKey")
- .HasPrincipalKey("Key")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
+ .HasPrincipalKey("Key");
b.Navigation("Series");
});
diff --git a/src/Ombi.Store/Migrations/OmbiMySql/20220407114619_RequestSource.Designer.cs b/src/Ombi.Store/Migrations/OmbiMySql/20220407114619_RequestSource.Designer.cs
new file mode 100644
index 000000000..c4d1fd2f1
--- /dev/null
+++ b/src/Ombi.Store/Migrations/OmbiMySql/20220407114619_RequestSource.Designer.cs
@@ -0,0 +1,1285 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Ombi.Store.Context.MySql;
+
+#nullable disable
+
+namespace Ombi.Store.Migrations.OmbiMySql
+{
+ [DbContext(typeof(OmbiMySqlContext))]
+ [Migration("20220407114619_RequestSource")]
+ partial class RequestSource
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "6.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("varchar(255)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("longtext");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("ClaimType")
+ .HasColumnType("longtext");
+
+ b.Property("ClaimValue")
+ .HasColumnType("longtext");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("ClaimType")
+ .HasColumnType("longtext");
+
+ b.Property("ClaimValue")
+ .HasColumnType("longtext");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasColumnType("varchar(255)");
+
+ b.Property("ProviderKey")
+ .HasColumnType("varchar(255)");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("longtext");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("varchar(255)");
+
+ b.Property("RoleId")
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("varchar(255)");
+
+ b.Property("LoginProvider")
+ .HasColumnType("varchar(255)");
+
+ b.Property("Name")
+ .HasColumnType("varchar(255)");
+
+ b.Property("Value")
+ .HasColumnType("longtext");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens", (string)null);
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.Audit", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AuditArea")
+ .HasColumnType("int");
+
+ b.Property("AuditType")
+ .HasColumnType("int");
+
+ b.Property("DateTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Description")
+ .HasColumnType("longtext");
+
+ b.Property("User")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("Audit");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.MobileDevices", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Token")
+ .HasColumnType("longtext");
+
+ b.Property("UserId")
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("MobileDevices");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.NotificationTemplates", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("Agent")
+ .HasColumnType("int");
+
+ b.Property("Enabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Message")
+ .HasColumnType("longtext");
+
+ b.Property("NotificationType")
+ .HasColumnType("int");
+
+ b.Property("Subject")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.ToTable("NotificationTemplates");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.NotificationUserId", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("PlayerId")
+ .HasColumnType("longtext");
+
+ b.Property("UserId")
+ .HasColumnType("varchar(255)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("NotificationUserId");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.OmbiUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("varchar(255)");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("int");
+
+ b.Property("Alias")
+ .HasColumnType("longtext");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("longtext");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("EpisodeRequestLimit")
+ .HasColumnType("int");
+
+ b.Property("EpisodeRequestLimitType")
+ .HasColumnType("int");
+
+ b.Property("Language")
+ .HasColumnType("longtext");
+
+ b.Property("LastLoggedIn")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("datetime(6)");
+
+ b.Property("MediaServerToken")
+ .HasColumnType("longtext");
+
+ b.Property("MovieRequestLimit")
+ .HasColumnType("int");
+
+ b.Property("MovieRequestLimitType")
+ .HasColumnType("int");
+
+ b.Property("MusicRequestLimit")
+ .HasColumnType("int");
+
+ b.Property("MusicRequestLimitType")
+ .HasColumnType("int");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("longtext");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("longtext");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ProviderUserId")
+ .HasColumnType("longtext");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("longtext");
+
+ b.Property("StreamingCountry")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("UserAccessToken")
+ .HasColumnType("longtext");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("UserType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers", (string)null);
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("AddedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("AlbumId")
+ .HasColumnType("longtext");
+
+ b.Property("ContentId")
+ .HasColumnType("int");
+
+ b.Property("ContentType")
+ .HasColumnType("int");
+
+ b.Property("EpisodeNumber")
+ .HasColumnType("int");
+
+ b.Property("SeasonNumber")
+ .HasColumnType("int");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("RecentlyAddedLog");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.RequestQueue", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("Completed")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Dts")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Error")
+ .HasColumnType("longtext");
+
+ b.Property("RequestId")
+ .HasColumnType("int");
+
+ b.Property("RetryCount")
+ .HasColumnType("int");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("RequestQueue");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ b.Property("Approved")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ArtistName")
+ .HasColumnType("longtext");
+
+ b.Property("Available")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Cover")
+ .HasColumnType("longtext");
+
+ b.Property("Denied")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("DeniedReason")
+ .HasColumnType("longtext");
+
+ b.Property("Disk")
+ .HasColumnType("longtext");
+
+ b.Property("ForeignAlbumId")
+ .HasColumnType("longtext");
+
+ b.Property("ForeignArtistId")
+ .HasColumnType("longtext");
+
+ b.Property("MarkedAsApproved")
+ .HasColumnType("datetime(6)");
+
+ b.Property("MarkedAsAvailable")
+ .HasColumnType("datetime(6)");
+
+ b.Property("MarkedAsDenied")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Rating")
+ .HasColumnType("decimal(65,30)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("RequestType")
+ .HasColumnType("int");
+
+ b.Property("RequestedByAlias")
+ .HasColumnType("longtext");
+
+ b.Property("RequestedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("RequestedUserId")
+ .HasColumnType("varchar(255)");
+
+ b.Property("Source")
+ .HasColumnType("int");
+
+ b.Property("Title")
+ .HasColumnType("longtext");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RequestedUserId");
+
+ b.ToTable("AlbumRequests");
+ });
+
+ modelBuilder.Entity("Ombi.Store.Entities.Requests.ChildRequests", b =>
+ {
+ b.Property