diff --git a/.gitignore b/.gitignore
index 54f0e34..f18d73d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,5 @@
bin
Debug
/WatchLog/Data/WatchLog.db
-Migrations
+#Migrations
obj
diff --git a/CouchLog/Migrations/20251024223003_InitialCreate.Designer.cs b/CouchLog/Migrations/20251024223003_InitialCreate.Designer.cs
new file mode 100644
index 0000000..02741c8
--- /dev/null
+++ b/CouchLog/Migrations/20251024223003_InitialCreate.Designer.cs
@@ -0,0 +1,982 @@
+//
+using System;
+using CouchLog.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CouchLog.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20251024223003_InitialCreate")]
+ partial class InitialCreate
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "9.0.9");
+
+ modelBuilder.Entity("CouchLog.Data.ApplicationUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("TEXT");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("TEXT");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers", (string)null);
+ });
+
+ modelBuilder.Entity("CouchLog.Data.Genre", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("Genres");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.GlobalEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("PicturePath")
+ .HasMaxLength(500)
+ .HasColumnType("TEXT");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("TEXT");
+
+ b.Property("TypeId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreatorId");
+
+ b.HasIndex("TypeId");
+
+ b.ToTable("GlobalEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.Label", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreatorId");
+
+ b.ToTable("Labels");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableGlobalGenre", b =>
+ {
+ b.Property("GlobalEntityId")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(0);
+
+ b.Property("GenreId")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(1);
+
+ b.HasKey("GlobalEntityId", "GenreId");
+
+ b.HasIndex("GenreId");
+
+ b.ToTable("LinkTableGlobalGenre");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTablePrivateLabel", b =>
+ {
+ b.Property("PrivateEntityId")
+ .HasColumnType("INTEGER");
+
+ b.Property("LabelId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("PrivateEntityId", "LabelId");
+
+ b.HasIndex("LabelId");
+
+ b.ToTable("LinkTablePrivateLabel");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTablePrivateStreamingPlatform", b =>
+ {
+ b.Property("PrivateEntityId")
+ .HasColumnType("INTEGER");
+
+ b.Property("StreamingPlatformId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SharedListEntityId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("PrivateEntityId", "StreamingPlatformId");
+
+ b.HasIndex("SharedListEntityId");
+
+ b.HasIndex("StreamingPlatformId");
+
+ b.ToTable("LinkTablePrivateStreamingPlatform");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableSharedLabel", b =>
+ {
+ b.Property("SharedListLabelId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SharedListEntityId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("SharedListLabelId", "SharedListEntityId");
+
+ b.HasIndex("SharedListEntityId");
+
+ b.ToTable("LinkTableSharedLabel");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableSharedUser", b =>
+ {
+ b.Property("SharedListId")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("SharedListId", "UserId");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("LinkTableSharedUser");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.MediaType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("MediaType");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.PrivateEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("Episode")
+ .HasColumnType("INTEGER");
+
+ b.Property("Favorite")
+ .HasColumnType("INTEGER");
+
+ b.Property("GlobalEntityId")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Rating")
+ .HasColumnType("INTEGER");
+
+ b.Property("Season")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UserWatchStatusId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GlobalEntityId");
+
+ b.HasIndex("UserId");
+
+ b.HasIndex("UserWatchStatusId");
+
+ b.ToTable("PrivateEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedList", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(150)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("SharedLists");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("Episode")
+ .HasColumnType("INTEGER");
+
+ b.Property("Favorite")
+ .HasColumnType("INTEGER");
+
+ b.Property("GlobalEntityId")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Season")
+ .HasColumnType("INTEGER");
+
+ b.Property("SharedListId")
+ .HasColumnType("INTEGER");
+
+ b.Property("SharedWatchStatusId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("GlobalEntityId");
+
+ b.HasIndex("SharedListId");
+
+ b.HasIndex("SharedWatchStatusId");
+
+ b.ToTable("SharedListEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListLabel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.Property("SharedListId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SharedListId");
+
+ b.ToTable("SharedListLabels");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ColorCode")
+ .HasMaxLength(7)
+ .HasColumnType("TEXT");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.Property("SharedListId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SharedListId");
+
+ b.ToTable("SharedWatchStatuses");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.StreamingPlatform", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT");
+
+ b.Property("PicturePath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("StreamingPlatforms");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.UserWatchStatus", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ColorCode")
+ .HasMaxLength(7)
+ .HasColumnType("TEXT");
+
+ b.Property("CreationTime")
+ .HasColumnType("TEXT");
+
+ b.Property("Description")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property("LastChange")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("UserWatchStatuses");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ 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("INTEGER");
+
+ b.Property("ClaimType")
+ .HasColumnType("TEXT");
+
+ b.Property("ClaimValue")
+ .HasColumnType("TEXT");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ClaimType")
+ .HasColumnType("TEXT");
+
+ b.Property("ClaimValue")
+ .HasColumnType("TEXT");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasColumnType("TEXT");
+
+ b.Property("ProviderKey")
+ .HasColumnType("TEXT");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("TEXT");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("TEXT");
+
+ b.Property("RoleId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("TEXT");
+
+ b.Property("LoginProvider")
+ .HasColumnType("TEXT");
+
+ b.Property("Name")
+ .HasColumnType("TEXT");
+
+ b.Property("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens", (string)null);
+ });
+
+ modelBuilder.Entity("CouchLog.Data.GlobalEntity", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", "User")
+ .WithMany("CreatedGlobalEntities")
+ .HasForeignKey("CreatorId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.MediaType", "MediaType")
+ .WithMany("GlobalEntities")
+ .HasForeignKey("TypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("MediaType");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.Label", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", "User")
+ .WithMany("CreatedLabels")
+ .HasForeignKey("CreatorId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableGlobalGenre", b =>
+ {
+ b.HasOne("CouchLog.Data.Genre", "Genre")
+ .WithMany("LinkTableGlobalGenres")
+ .HasForeignKey("GenreId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity")
+ .WithMany("LinkTableGlobalGenres")
+ .HasForeignKey("GlobalEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Genre");
+
+ b.Navigation("GlobalEntity");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTablePrivateLabel", b =>
+ {
+ b.HasOne("CouchLog.Data.Label", "Label")
+ .WithMany("LinkTablePrivateLabels")
+ .HasForeignKey("LabelId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.PrivateEntity", "PrivateEntity")
+ .WithMany("PrivateEntityLabels")
+ .HasForeignKey("PrivateEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Label");
+
+ b.Navigation("PrivateEntity");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTablePrivateStreamingPlatform", b =>
+ {
+ b.HasOne("CouchLog.Data.PrivateEntity", "PrivateEntity")
+ .WithMany("PrivateStreamingPlatforms")
+ .HasForeignKey("PrivateEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.SharedListEntity", null)
+ .WithMany("LinkTablePrivateStreamingPlatforms")
+ .HasForeignKey("SharedListEntityId");
+
+ b.HasOne("CouchLog.Data.StreamingPlatform", "StreamingPlatform")
+ .WithMany()
+ .HasForeignKey("StreamingPlatformId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("PrivateEntity");
+
+ b.Navigation("StreamingPlatform");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableSharedLabel", b =>
+ {
+ b.HasOne("CouchLog.Data.SharedListEntity", "SharedListEntity")
+ .WithMany("LinkTableSharedLabels")
+ .HasForeignKey("SharedListEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.SharedListLabel", "SharedListLabel")
+ .WithMany("LinkTableSharedLabels")
+ .HasForeignKey("SharedListLabelId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("SharedListEntity");
+
+ b.Navigation("SharedListLabel");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.LinkTableSharedUser", b =>
+ {
+ b.HasOne("CouchLog.Data.SharedList", "SharedList")
+ .WithMany("SharedListUsers")
+ .HasForeignKey("SharedListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.ApplicationUser", "User")
+ .WithMany("LinkTableSharedUsers")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("SharedList");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.PrivateEntity", b =>
+ {
+ b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity")
+ .WithMany("PrivateEntities")
+ .HasForeignKey("GlobalEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.ApplicationUser", "User")
+ .WithMany("PrivateEntities")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.UserWatchStatus", "UserWatchStatus")
+ .WithMany("PrivateEntities")
+ .HasForeignKey("UserWatchStatusId");
+
+ b.Navigation("GlobalEntity");
+
+ b.Navigation("User");
+
+ b.Navigation("UserWatchStatus");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListEntity", b =>
+ {
+ b.HasOne("CouchLog.Data.GlobalEntity", "GlobalEntity")
+ .WithMany("SharedListEntities")
+ .HasForeignKey("GlobalEntityId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.SharedList", "SharedList")
+ .WithMany("SharedListEntities")
+ .HasForeignKey("SharedListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.SharedWatchStatus", "SharedWatchStatus")
+ .WithMany("SharedListEntities")
+ .HasForeignKey("SharedWatchStatusId");
+
+ b.Navigation("GlobalEntity");
+
+ b.Navigation("SharedList");
+
+ b.Navigation("SharedWatchStatus");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListLabel", b =>
+ {
+ b.HasOne("CouchLog.Data.SharedList", "SharedList")
+ .WithMany("SharedListLabels")
+ .HasForeignKey("SharedListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("SharedList");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b =>
+ {
+ b.HasOne("CouchLog.Data.SharedList", "SharedList")
+ .WithMany("SharedWatchStatuses")
+ .HasForeignKey("SharedListId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("SharedList");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.UserWatchStatus", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", "User")
+ .WithMany("UserWatchStatuses")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CouchLog.Data.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.HasOne("CouchLog.Data.ApplicationUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("CouchLog.Data.ApplicationUser", b =>
+ {
+ b.Navigation("CreatedGlobalEntities");
+
+ b.Navigation("CreatedLabels");
+
+ b.Navigation("LinkTableSharedUsers");
+
+ b.Navigation("PrivateEntities");
+
+ b.Navigation("UserWatchStatuses");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.Genre", b =>
+ {
+ b.Navigation("LinkTableGlobalGenres");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.GlobalEntity", b =>
+ {
+ b.Navigation("LinkTableGlobalGenres");
+
+ b.Navigation("PrivateEntities");
+
+ b.Navigation("SharedListEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.Label", b =>
+ {
+ b.Navigation("LinkTablePrivateLabels");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.MediaType", b =>
+ {
+ b.Navigation("GlobalEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.PrivateEntity", b =>
+ {
+ b.Navigation("PrivateEntityLabels");
+
+ b.Navigation("PrivateStreamingPlatforms");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedList", b =>
+ {
+ b.Navigation("SharedListEntities");
+
+ b.Navigation("SharedListLabels");
+
+ b.Navigation("SharedListUsers");
+
+ b.Navigation("SharedWatchStatuses");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListEntity", b =>
+ {
+ b.Navigation("LinkTablePrivateStreamingPlatforms");
+
+ b.Navigation("LinkTableSharedLabels");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedListLabel", b =>
+ {
+ b.Navigation("LinkTableSharedLabels");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.SharedWatchStatus", b =>
+ {
+ b.Navigation("SharedListEntities");
+ });
+
+ modelBuilder.Entity("CouchLog.Data.UserWatchStatus", b =>
+ {
+ b.Navigation("PrivateEntities");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CouchLog/Migrations/20251024223003_InitialCreate.cs b/CouchLog/Migrations/20251024223003_InitialCreate.cs
new file mode 100644
index 0000000..960f67e
--- /dev/null
+++ b/CouchLog/Migrations/20251024223003_InitialCreate.cs
@@ -0,0 +1,744 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CouchLog.Migrations
+{
+ ///
+ public partial class InitialCreate : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "AspNetRoles",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ Name = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ ConcurrencyStamp = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetRoles", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetUsers",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ UserName = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ NormalizedUserName = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ Email = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ NormalizedEmail = table.Column(type: "TEXT", maxLength: 256, nullable: true),
+ EmailConfirmed = table.Column(type: "INTEGER", nullable: false),
+ PasswordHash = table.Column(type: "TEXT", nullable: true),
+ SecurityStamp = table.Column(type: "TEXT", nullable: true),
+ ConcurrencyStamp = table.Column(type: "TEXT", nullable: true),
+ PhoneNumber = table.Column(type: "TEXT", nullable: true),
+ PhoneNumberConfirmed = table.Column(type: "INTEGER", nullable: false),
+ TwoFactorEnabled = table.Column(type: "INTEGER", nullable: false),
+ LockoutEnd = table.Column(type: "TEXT", nullable: true),
+ LockoutEnabled = table.Column(type: "INTEGER", nullable: false),
+ AccessFailedCount = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetUsers", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Genres",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Genres", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "MediaType",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_MediaType", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "SharedLists",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 150, nullable: false),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SharedLists", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "StreamingPlatforms",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
+ PicturePath = table.Column(type: "TEXT", nullable: false),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_StreamingPlatforms", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetRoleClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ RoleId = table.Column(type: "TEXT", nullable: false),
+ ClaimType = table.Column(type: "TEXT", nullable: true),
+ ClaimValue = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
+ column: x => x.RoleId,
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetUserClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ UserId = table.Column(type: "TEXT", nullable: false),
+ ClaimType = table.Column(type: "TEXT", nullable: true),
+ ClaimValue = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AspNetUserClaims_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetUserLogins",
+ columns: table => new
+ {
+ LoginProvider = table.Column(type: "TEXT", nullable: false),
+ ProviderKey = table.Column(type: "TEXT", nullable: false),
+ ProviderDisplayName = table.Column(type: "TEXT", nullable: true),
+ UserId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
+ table.ForeignKey(
+ name: "FK_AspNetUserLogins_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetUserRoles",
+ columns: table => new
+ {
+ UserId = table.Column(type: "TEXT", nullable: false),
+ RoleId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
+ table.ForeignKey(
+ name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
+ column: x => x.RoleId,
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_AspNetUserRoles_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AspNetUserTokens",
+ columns: table => new
+ {
+ UserId = table.Column(type: "TEXT", nullable: false),
+ LoginProvider = table.Column(type: "TEXT", nullable: false),
+ Name = table.Column(type: "TEXT", nullable: false),
+ Value = table.Column(type: "TEXT", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
+ table.ForeignKey(
+ name: "FK_AspNetUserTokens_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Labels",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ CreatorId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Labels", x => x.Id);
+ table.ForeignKey(
+ name: "FK_Labels_AspNetUsers_CreatorId",
+ column: x => x.CreatorId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "UserWatchStatuses",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 255, nullable: true),
+ ColorCode = table.Column(type: "TEXT", maxLength: 7, nullable: true),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ UserId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_UserWatchStatuses", x => x.Id);
+ table.ForeignKey(
+ name: "FK_UserWatchStatuses_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "GlobalEntities",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Title = table.Column(type: "TEXT", maxLength: 200, nullable: false),
+ PicturePath = table.Column(type: "TEXT", maxLength: 500, nullable: true),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ TypeId = table.Column(type: "INTEGER", nullable: false),
+ CreatorId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_GlobalEntities", x => x.Id);
+ table.ForeignKey(
+ name: "FK_GlobalEntities_AspNetUsers_CreatorId",
+ column: x => x.CreatorId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_GlobalEntities_MediaType_TypeId",
+ column: x => x.TypeId,
+ principalTable: "MediaType",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "LinkTableSharedUser",
+ columns: table => new
+ {
+ SharedListId = table.Column(type: "INTEGER", nullable: false),
+ UserId = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LinkTableSharedUser", x => new { x.SharedListId, x.UserId });
+ table.ForeignKey(
+ name: "FK_LinkTableSharedUser_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_LinkTableSharedUser_SharedLists_SharedListId",
+ column: x => x.SharedListId,
+ principalTable: "SharedLists",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "SharedListLabels",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ SharedListId = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SharedListLabels", x => x.Id);
+ table.ForeignKey(
+ name: "FK_SharedListLabels_SharedLists_SharedListId",
+ column: x => x.SharedListId,
+ principalTable: "SharedLists",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "SharedWatchStatuses",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Name = table.Column(type: "TEXT", maxLength: 50, nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 255, nullable: true),
+ ColorCode = table.Column(type: "TEXT", maxLength: 7, nullable: true),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ SharedListId = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SharedWatchStatuses", x => x.Id);
+ table.ForeignKey(
+ name: "FK_SharedWatchStatuses_SharedLists_SharedListId",
+ column: x => x.SharedListId,
+ principalTable: "SharedLists",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "LinkTableGlobalGenre",
+ columns: table => new
+ {
+ GlobalEntityId = table.Column(type: "INTEGER", nullable: false),
+ GenreId = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LinkTableGlobalGenre", x => new { x.GlobalEntityId, x.GenreId });
+ table.ForeignKey(
+ name: "FK_LinkTableGlobalGenre_Genres_GenreId",
+ column: x => x.GenreId,
+ principalTable: "Genres",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_LinkTableGlobalGenre_GlobalEntities_GlobalEntityId",
+ column: x => x.GlobalEntityId,
+ principalTable: "GlobalEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "PrivateEntities",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Favorite = table.Column(type: "INTEGER", nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 1000, nullable: true),
+ Season = table.Column(type: "INTEGER", nullable: true),
+ Episode = table.Column(type: "INTEGER", nullable: true),
+ Rating = table.Column(type: "INTEGER", nullable: true),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ UserId = table.Column(type: "TEXT", nullable: false),
+ GlobalEntityId = table.Column(type: "INTEGER", nullable: false),
+ UserWatchStatusId = table.Column(type: "INTEGER", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_PrivateEntities", x => x.Id);
+ table.ForeignKey(
+ name: "FK_PrivateEntities_AspNetUsers_UserId",
+ column: x => x.UserId,
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_PrivateEntities_GlobalEntities_GlobalEntityId",
+ column: x => x.GlobalEntityId,
+ principalTable: "GlobalEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_PrivateEntities_UserWatchStatuses_UserWatchStatusId",
+ column: x => x.UserWatchStatusId,
+ principalTable: "UserWatchStatuses",
+ principalColumn: "Id");
+ });
+
+ migrationBuilder.CreateTable(
+ name: "SharedListEntities",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ Favorite = table.Column(type: "INTEGER", nullable: false),
+ Description = table.Column(type: "TEXT", maxLength: 1000, nullable: true),
+ Season = table.Column(type: "INTEGER", nullable: true),
+ Episode = table.Column(type: "INTEGER", nullable: true),
+ CreationTime = table.Column(type: "TEXT", nullable: false),
+ LastChange = table.Column(type: "TEXT", nullable: true),
+ SharedListId = table.Column(type: "INTEGER", nullable: false),
+ GlobalEntityId = table.Column(type: "INTEGER", nullable: false),
+ SharedWatchStatusId = table.Column(type: "INTEGER", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_SharedListEntities", x => x.Id);
+ table.ForeignKey(
+ name: "FK_SharedListEntities_GlobalEntities_GlobalEntityId",
+ column: x => x.GlobalEntityId,
+ principalTable: "GlobalEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_SharedListEntities_SharedLists_SharedListId",
+ column: x => x.SharedListId,
+ principalTable: "SharedLists",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_SharedListEntities_SharedWatchStatuses_SharedWatchStatusId",
+ column: x => x.SharedWatchStatusId,
+ principalTable: "SharedWatchStatuses",
+ principalColumn: "Id");
+ });
+
+ migrationBuilder.CreateTable(
+ name: "LinkTablePrivateLabel",
+ columns: table => new
+ {
+ PrivateEntityId = table.Column(type: "INTEGER", nullable: false),
+ LabelId = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LinkTablePrivateLabel", x => new { x.PrivateEntityId, x.LabelId });
+ table.ForeignKey(
+ name: "FK_LinkTablePrivateLabel_Labels_LabelId",
+ column: x => x.LabelId,
+ principalTable: "Labels",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_LinkTablePrivateLabel_PrivateEntities_PrivateEntityId",
+ column: x => x.PrivateEntityId,
+ principalTable: "PrivateEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "LinkTablePrivateStreamingPlatform",
+ columns: table => new
+ {
+ PrivateEntityId = table.Column(type: "INTEGER", nullable: false),
+ StreamingPlatformId = table.Column(type: "INTEGER", nullable: false),
+ SharedListEntityId = table.Column(type: "INTEGER", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LinkTablePrivateStreamingPlatform", x => new { x.PrivateEntityId, x.StreamingPlatformId });
+ table.ForeignKey(
+ name: "FK_LinkTablePrivateStreamingPlatform_PrivateEntities_PrivateEntityId",
+ column: x => x.PrivateEntityId,
+ principalTable: "PrivateEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_LinkTablePrivateStreamingPlatform_SharedListEntities_SharedListEntityId",
+ column: x => x.SharedListEntityId,
+ principalTable: "SharedListEntities",
+ principalColumn: "Id");
+ table.ForeignKey(
+ name: "FK_LinkTablePrivateStreamingPlatform_StreamingPlatforms_StreamingPlatformId",
+ column: x => x.StreamingPlatformId,
+ principalTable: "StreamingPlatforms",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "LinkTableSharedLabel",
+ columns: table => new
+ {
+ SharedListLabelId = table.Column(type: "INTEGER", nullable: false),
+ SharedListEntityId = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_LinkTableSharedLabel", x => new { x.SharedListLabelId, x.SharedListEntityId });
+ table.ForeignKey(
+ name: "FK_LinkTableSharedLabel_SharedListEntities_SharedListEntityId",
+ column: x => x.SharedListEntityId,
+ principalTable: "SharedListEntities",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_LinkTableSharedLabel_SharedListLabels_SharedListLabelId",
+ column: x => x.SharedListLabelId,
+ principalTable: "SharedListLabels",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AspNetRoleClaims_RoleId",
+ table: "AspNetRoleClaims",
+ column: "RoleId");
+
+ migrationBuilder.CreateIndex(
+ name: "RoleNameIndex",
+ table: "AspNetRoles",
+ column: "NormalizedName",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AspNetUserClaims_UserId",
+ table: "AspNetUserClaims",
+ column: "UserId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AspNetUserLogins_UserId",
+ table: "AspNetUserLogins",
+ column: "UserId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AspNetUserRoles_RoleId",
+ table: "AspNetUserRoles",
+ column: "RoleId");
+
+ migrationBuilder.CreateIndex(
+ name: "EmailIndex",
+ table: "AspNetUsers",
+ column: "NormalizedEmail");
+
+ migrationBuilder.CreateIndex(
+ name: "UserNameIndex",
+ table: "AspNetUsers",
+ column: "NormalizedUserName",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_GlobalEntities_CreatorId",
+ table: "GlobalEntities",
+ column: "CreatorId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_GlobalEntities_TypeId",
+ table: "GlobalEntities",
+ column: "TypeId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Labels_CreatorId",
+ table: "Labels",
+ column: "CreatorId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTableGlobalGenre_GenreId",
+ table: "LinkTableGlobalGenre",
+ column: "GenreId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTablePrivateLabel_LabelId",
+ table: "LinkTablePrivateLabel",
+ column: "LabelId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTablePrivateStreamingPlatform_SharedListEntityId",
+ table: "LinkTablePrivateStreamingPlatform",
+ column: "SharedListEntityId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTablePrivateStreamingPlatform_StreamingPlatformId",
+ table: "LinkTablePrivateStreamingPlatform",
+ column: "StreamingPlatformId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTableSharedLabel_SharedListEntityId",
+ table: "LinkTableSharedLabel",
+ column: "SharedListEntityId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_LinkTableSharedUser_UserId",
+ table: "LinkTableSharedUser",
+ column: "UserId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_PrivateEntities_GlobalEntityId",
+ table: "PrivateEntities",
+ column: "GlobalEntityId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_PrivateEntities_UserId",
+ table: "PrivateEntities",
+ column: "UserId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_PrivateEntities_UserWatchStatusId",
+ table: "PrivateEntities",
+ column: "UserWatchStatusId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SharedListEntities_GlobalEntityId",
+ table: "SharedListEntities",
+ column: "GlobalEntityId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SharedListEntities_SharedListId",
+ table: "SharedListEntities",
+ column: "SharedListId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SharedListEntities_SharedWatchStatusId",
+ table: "SharedListEntities",
+ column: "SharedWatchStatusId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SharedListLabels_SharedListId",
+ table: "SharedListLabels",
+ column: "SharedListId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SharedWatchStatuses_SharedListId",
+ table: "SharedWatchStatuses",
+ column: "SharedListId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_UserWatchStatuses_UserId",
+ table: "UserWatchStatuses",
+ column: "UserId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "AspNetRoleClaims");
+
+ migrationBuilder.DropTable(
+ name: "AspNetUserClaims");
+
+ migrationBuilder.DropTable(
+ name: "AspNetUserLogins");
+
+ migrationBuilder.DropTable(
+ name: "AspNetUserRoles");
+
+ migrationBuilder.DropTable(
+ name: "AspNetUserTokens");
+
+ migrationBuilder.DropTable(
+ name: "LinkTableGlobalGenre");
+
+ migrationBuilder.DropTable(
+ name: "LinkTablePrivateLabel");
+
+ migrationBuilder.DropTable(
+ name: "LinkTablePrivateStreamingPlatform");
+
+ migrationBuilder.DropTable(
+ name: "LinkTableSharedLabel");
+
+ migrationBuilder.DropTable(
+ name: "LinkTableSharedUser");
+
+ migrationBuilder.DropTable(
+ name: "AspNetRoles");
+
+ migrationBuilder.DropTable(
+ name: "Genres");
+
+ migrationBuilder.DropTable(
+ name: "Labels");
+
+ migrationBuilder.DropTable(
+ name: "PrivateEntities");
+
+ migrationBuilder.DropTable(
+ name: "StreamingPlatforms");
+
+ migrationBuilder.DropTable(
+ name: "SharedListEntities");
+
+ migrationBuilder.DropTable(
+ name: "SharedListLabels");
+
+ migrationBuilder.DropTable(
+ name: "UserWatchStatuses");
+
+ migrationBuilder.DropTable(
+ name: "GlobalEntities");
+
+ migrationBuilder.DropTable(
+ name: "SharedWatchStatuses");
+
+ migrationBuilder.DropTable(
+ name: "AspNetUsers");
+
+ migrationBuilder.DropTable(
+ name: "MediaType");
+
+ migrationBuilder.DropTable(
+ name: "SharedLists");
+ }
+ }
+}
diff --git a/CouchLog/Migrations/20251201221542_HardcodeUserWatchStatus.Designer.cs b/CouchLog/Migrations/20251201221542_HardcodeUserWatchStatus.Designer.cs
new file mode 100644
index 0000000..e4ca7c6
--- /dev/null
+++ b/CouchLog/Migrations/20251201221542_HardcodeUserWatchStatus.Designer.cs
@@ -0,0 +1,972 @@
+//
+using System;
+using CouchLog.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CouchLog.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20251201221542_HardcodeUserWatchStatus")]
+ partial class HardcodeUserWatchStatus
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
+
+ modelBuilder.Entity("CouchLog.Data.ApplicationUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("TEXT");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("PasswordHash")
+ .HasColumnType("TEXT");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("TEXT");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("INTEGER");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("TEXT");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("INTEGER");
+
+ b.Property