mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 09:14:45 +03:00
Fixed Duplicate returns on grouping
Fixed UserDataKey not stored
This commit is contained in:
@@ -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" });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user