using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Jellyfin.Server.Implementations.Migrations { /// public partial class AddedCustomDataKeyKey : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_UserData", table: "UserData"); migrationBuilder.AlterColumn( 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" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_UserData", table: "UserData"); migrationBuilder.AlterColumn( name: "CustomDataKey", table: "UserData", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AddPrimaryKey( name: "PK_UserData", table: "UserData", columns: new[] { "ItemId", "UserId" }); } } }