aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2024-11-11 17:39:50 +0000
committerJPVenson <github@jpb.email>2024-11-11 17:39:50 +0000
commit508b27f15643dc04d0ca1dda92a3b18bdeb43a5a (patch)
treee45283c63b0bd16d3e1cc8eed9c3e765a995fbf7 /Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs
parentbdab5e549eb158a9a58161e73cd0ef988ae37599 (diff)
Fixed Duplicate returns on grouping
Fixed UserDataKey not stored
Diffstat (limited to 'Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs')
-rw-r--r--Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs b/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs
new file mode 100644
index 000000000..4558d7c49
--- /dev/null
+++ b/Jellyfin.Server.Implementations/Migrations/20241111135439_AddedCustomDataKeyKey.cs
@@ -0,0 +1,54 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Jellyfin.Server.Implementations.Migrations
+{
+ /// <inheritdoc />
+ public partial class AddedCustomDataKeyKey : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_UserData",
+ table: "UserData");
+
+ migrationBuilder.AlterColumn<string>(
+ name: "CustomDataKey",
+ table: "UserData",
+ type: "TEXT",
+ nullable: false,
+ defaultValue: string.Empty,
+ oldClrType: typeof(string),
+ oldType: "TEXT",
+ oldNullable: true);
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_UserData",
+ table: "UserData",
+ columns: new[] { "ItemId", "UserId", "CustomDataKey" });
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_UserData",
+ table: "UserData");
+
+ migrationBuilder.AlterColumn<string>(
+ name: "CustomDataKey",
+ table: "UserData",
+ type: "TEXT",
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "TEXT");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_UserData",
+ table: "UserData",
+ columns: new[] { "ItemId", "UserId" });
+ }
+ }
+}