mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Aggregated Migrations
This commit is contained in:
parent
441b995189
commit
5e922f1c10
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,169 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ExpandedBaseItemFields : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Images",
|
||||
table: "BaseItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LockedFields",
|
||||
table: "BaseItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TrailerTypes",
|
||||
table: "BaseItems");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ExtraType",
|
||||
table: "BaseItems",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Audio",
|
||||
table: "BaseItems",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemImageInfos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Path = table.Column<string>(type: "TEXT", nullable: false),
|
||||
DateModified = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
ImageType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Width = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Height = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Blurhash = table.Column<byte[]>(type: "BLOB", nullable: true),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemImageInfos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemImageInfos_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemMetadataFields",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemMetadataFields", x => new { x.Id, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemMetadataFields_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemTrailerTypes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemTrailerTypes", x => new { x.Id, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemTrailerTypes_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemImageInfos_ItemId",
|
||||
table: "BaseItemImageInfos",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemMetadataFields_ItemId",
|
||||
table: "BaseItemMetadataFields",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemTrailerTypes_ItemId",
|
||||
table: "BaseItemTrailerTypes",
|
||||
column: "ItemId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemImageInfos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemMetadataFields");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemTrailerTypes");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ExtraType",
|
||||
table: "BaseItems",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Audio",
|
||||
table: "BaseItems",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Images",
|
||||
table: "BaseItems",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "LockedFields",
|
||||
table: "BaseItems",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TrailerTypes",
|
||||
table: "BaseItems",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,89 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixedAncestorIds : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ItemId",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AncestorIds_ItemId_AncestorIdText",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "AncestorIdText",
|
||||
table: "AncestorIds",
|
||||
newName: "BaseItemEntityId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Id",
|
||||
table: "AncestorIds",
|
||||
newName: "ParentItemId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_AncestorIds_Id",
|
||||
table: "AncestorIds",
|
||||
newName: "IX_AncestorIds_ParentItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AncestorIds_BaseItemEntityId",
|
||||
table: "AncestorIds",
|
||||
column: "BaseItemEntityId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
|
||||
table: "AncestorIds",
|
||||
column: "BaseItemEntityId",
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AncestorIds_BaseItemEntityId",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "BaseItemEntityId",
|
||||
table: "AncestorIds",
|
||||
newName: "AncestorIdText");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentItemId",
|
||||
table: "AncestorIds",
|
||||
newName: "Id");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_AncestorIds_ParentItemId",
|
||||
table: "AncestorIds",
|
||||
newName: "IX_AncestorIds_Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AncestorIds_ItemId_AncestorIdText",
|
||||
table: "AncestorIds",
|
||||
columns: new[] { "ItemId", "AncestorIdText" });
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ItemId",
|
||||
table: "AncestorIds",
|
||||
column: "ItemId",
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixedStreamType : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "StreamType",
|
||||
table: "MediaStreamInfos",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "StreamType",
|
||||
table: "MediaStreamInfos",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,133 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixedItemValueReferenceStyle : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ItemValues_BaseItems_ItemId",
|
||||
table: "ItemValues");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ItemValues",
|
||||
table: "ItemValues");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ItemValues_ItemId_Type_CleanValue",
|
||||
table: "ItemValues");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ItemId",
|
||||
table: "ItemValues",
|
||||
newName: "ItemValueId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ItemValues",
|
||||
table: "ItemValues",
|
||||
column: "ItemValueId");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ItemValuesMap",
|
||||
columns: table => new
|
||||
{
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
ItemValueId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ItemValuesMap", x => new { x.ItemValueId, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemValuesMap_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemValuesMap_ItemValues_ItemValueId",
|
||||
column: x => x.ItemValueId,
|
||||
principalTable: "ItemValues",
|
||||
principalColumn: "ItemValueId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValues_Type_CleanValue",
|
||||
table: "ItemValues",
|
||||
columns: new[] { "Type", "CleanValue" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValuesMap_ItemId",
|
||||
table: "ItemValuesMap",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ItemId",
|
||||
table: "AncestorIds",
|
||||
column: "ItemId",
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ParentItemId",
|
||||
table: "AncestorIds",
|
||||
column: "ParentItemId",
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ItemId",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ParentItemId",
|
||||
table: "AncestorIds");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ItemValuesMap");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ItemValues",
|
||||
table: "ItemValues");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ItemValues_Type_CleanValue",
|
||||
table: "ItemValues");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ItemValueId",
|
||||
table: "ItemValues",
|
||||
newName: "ItemId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ItemValues",
|
||||
table: "ItemValues",
|
||||
columns: new[] { "ItemId", "Type", "Value" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValues_ItemId_Type_CleanValue",
|
||||
table: "ItemValues",
|
||||
columns: new[] { "ItemId", "Type", "CleanValue" });
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ItemValues_BaseItems_ItemId",
|
||||
table: "ItemValues",
|
||||
column: "ItemId",
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
[DbContext(typeof(JellyfinDbContext))]
|
||||
[Migration("20241010142722_FixedItemValueReferenceStyle")]
|
||||
partial class FixedItemValueReferenceStyle
|
||||
[Migration("20241010160703_LibraryDbMigration")]
|
||||
partial class LibraryDbMigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class BaseItemRefactor : Migration
|
||||
public partial class LibraryDbMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
@ -48,15 +48,12 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
DateLastRefreshed = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
DateLastSaved = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
IsInMixedFolder = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
LockedFields = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Studios = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Audio = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ExternalServiceId = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Tags = table.Column<string>(type: "TEXT", nullable: true),
|
||||
IsFolder = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
InheritedParentalRatingValue = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
UnratedType = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TrailerTypes = table.Column<string>(type: "TEXT", nullable: true),
|
||||
CriticRating = table.Column<float>(type: "REAL", nullable: true),
|
||||
CleanName = table.Column<string>(type: "TEXT", nullable: true),
|
||||
PresentationUniqueKey = table.Column<string>(type: "TEXT", nullable: true),
|
||||
@ -72,11 +69,10 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
SeasonName = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ExternalSeriesId = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Tagline = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Images = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ProductionLocations = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ExtraIds = table.Column<string>(type: "TEXT", nullable: true),
|
||||
TotalBitrate = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
ExtraType = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ExtraType = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Artists = table.Column<string>(type: "TEXT", nullable: true),
|
||||
AlbumArtists = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ExternalId = table.Column<string>(type: "TEXT", nullable: true),
|
||||
@ -86,6 +82,7 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
Width = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Height = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Size = table.Column<long>(type: "INTEGER", nullable: true),
|
||||
Audio = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
ParentId = table.Column<Guid>(type: "TEXT", nullable: true),
|
||||
TopParentId = table.Column<Guid>(type: "TEXT", nullable: true),
|
||||
SeasonId = table.Column<Guid>(type: "TEXT", nullable: true),
|
||||
@ -97,22 +94,47 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AncestorIds",
|
||||
name: "ItemValues",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
AncestorIdText = table.Column<string>(type: "TEXT", nullable: true)
|
||||
ItemValueId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Value = table.Column<string>(type: "TEXT", nullable: false),
|
||||
CleanValue = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AncestorIds", x => new { x.ItemId, x.Id });
|
||||
table.PrimaryKey("PK_ItemValues", x => x.ItemValueId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AncestorIds",
|
||||
columns: table => new
|
||||
{
|
||||
ParentItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
BaseItemEntityId = table.Column<Guid>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AncestorIds", x => new { x.ItemId, x.ParentItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_BaseItemEntityId",
|
||||
column: x => x.BaseItemEntityId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AncestorIds_BaseItems_ParentItemId",
|
||||
column: x => x.ParentItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@ -138,6 +160,48 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemImageInfos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Path = table.Column<string>(type: "TEXT", nullable: false),
|
||||
DateModified = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
ImageType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Width = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Height = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Blurhash = table.Column<byte[]>(type: "BLOB", nullable: true),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemImageInfos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemImageInfos_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemMetadataFields",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemMetadataFields", x => new { x.Id, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemMetadataFields_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemProviders",
|
||||
columns: table => new
|
||||
@ -157,6 +221,24 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BaseItemTrailerTypes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BaseItemTrailerTypes", x => new { x.Id, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_BaseItemTrailerTypes_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Chapters",
|
||||
columns: table => new
|
||||
@ -179,33 +261,13 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ItemValues",
|
||||
columns: table => new
|
||||
{
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Value = table.Column<string>(type: "TEXT", nullable: false),
|
||||
CleanValue = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ItemValues", x => new { x.ItemId, x.Type, x.Value });
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemValues_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MediaStreamInfos",
|
||||
columns: table => new
|
||||
{
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
StreamIndex = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
StreamType = table.Column<string>(type: "TEXT", nullable: true),
|
||||
StreamType = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Codec = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Language = table.Column<string>(type: "TEXT", nullable: true),
|
||||
ChannelLayout = table.Column<string>(type: "TEXT", nullable: true),
|
||||
@ -316,15 +378,49 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AncestorIds_Id",
|
||||
table: "AncestorIds",
|
||||
column: "Id");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ItemValuesMap",
|
||||
columns: table => new
|
||||
{
|
||||
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
ItemValueId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ItemValuesMap", x => new { x.ItemValueId, x.ItemId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemValuesMap_BaseItems_ItemId",
|
||||
column: x => x.ItemId,
|
||||
principalTable: "BaseItems",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ItemValuesMap_ItemValues_ItemValueId",
|
||||
column: x => x.ItemValueId,
|
||||
principalTable: "ItemValues",
|
||||
principalColumn: "ItemValueId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AncestorIds_ItemId_AncestorIdText",
|
||||
name: "IX_AncestorIds_BaseItemEntityId",
|
||||
table: "AncestorIds",
|
||||
columns: new[] { "ItemId", "AncestorIdText" });
|
||||
column: "BaseItemEntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AncestorIds_ParentItemId",
|
||||
table: "AncestorIds",
|
||||
column: "ParentItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemImageInfos_ItemId",
|
||||
table: "BaseItemImageInfos",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemMetadataFields_ItemId",
|
||||
table: "BaseItemMetadataFields",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BaseItemProviders_ProviderId_ProviderValue_ItemId",
|
||||
@ -402,9 +498,19 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
columns: new[] { "UserDataKey", "Type" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValues_ItemId_Type_CleanValue",
|
||||
name: "IX_BaseItemTrailerTypes_ItemId",
|
||||
table: "BaseItemTrailerTypes",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValues_Type_CleanValue",
|
||||
table: "ItemValues",
|
||||
columns: new[] { "ItemId", "Type", "CleanValue" });
|
||||
columns: new[] { "Type", "CleanValue" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ItemValuesMap_ItemId",
|
||||
table: "ItemValuesMap",
|
||||
column: "ItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MediaStreamInfos_StreamIndex",
|
||||
@ -476,14 +582,23 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "AttachmentStreamInfos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemImageInfos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemMetadataFields");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemProviders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItemTrailerTypes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Chapters");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ItemValues");
|
||||
name: "ItemValuesMap");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MediaStreamInfos");
|
||||
@ -494,6 +609,9 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "UserData");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ItemValues");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BaseItems");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user