mirror of https://github.com/ErsatzTV/ErsatzTV.git
13 changed files with 14259 additions and 16 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,358 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Optimize_JellyfinItemIdEtagColumns : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinShow", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinShow", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinSeason", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinSeason", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinMovie", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinMovie", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinLibrary", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinCollection", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinCollection", |
||||||
|
type: "varchar(36)", |
||||||
|
unicode: false, |
||||||
|
maxLength: 36, |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "longtext", |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinShow_ItemId", |
||||||
|
table: "JellyfinShow", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinSeason_ItemId", |
||||||
|
table: "JellyfinSeason", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinMovie_ItemId", |
||||||
|
table: "JellyfinMovie", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinLibrary_ItemId", |
||||||
|
table: "JellyfinLibrary", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinEpisode_ItemId", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinCollection_ItemId", |
||||||
|
table: "JellyfinCollection", |
||||||
|
column: "ItemId"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinShow_ItemId", |
||||||
|
table: "JellyfinShow"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinSeason_ItemId", |
||||||
|
table: "JellyfinSeason"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinMovie_ItemId", |
||||||
|
table: "JellyfinMovie"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinLibrary_ItemId", |
||||||
|
table: "JellyfinLibrary"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinEpisode_ItemId", |
||||||
|
table: "JellyfinEpisode"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinCollection_ItemId", |
||||||
|
table: "JellyfinCollection"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinShow", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinShow", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinSeason", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinSeason", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinMovie", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinMovie", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinLibrary", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "ItemId", |
||||||
|
table: "JellyfinCollection", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>( |
||||||
|
name: "Etag", |
||||||
|
table: "JellyfinCollection", |
||||||
|
type: "longtext", |
||||||
|
nullable: true, |
||||||
|
oldClrType: typeof(string), |
||||||
|
oldType: "varchar(36)", |
||||||
|
oldUnicode: false, |
||||||
|
oldMaxLength: 36, |
||||||
|
oldNullable: true) |
||||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,72 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Optimize_JellyfinItemIdEtagColumns : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinShow_ItemId", |
||||||
|
table: "JellyfinShow", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinSeason_ItemId", |
||||||
|
table: "JellyfinSeason", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinMovie_ItemId", |
||||||
|
table: "JellyfinMovie", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinLibrary_ItemId", |
||||||
|
table: "JellyfinLibrary", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinEpisode_ItemId", |
||||||
|
table: "JellyfinEpisode", |
||||||
|
column: "ItemId"); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_JellyfinCollection_ItemId", |
||||||
|
table: "JellyfinCollection", |
||||||
|
column: "ItemId"); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinShow_ItemId", |
||||||
|
table: "JellyfinShow"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinSeason_ItemId", |
||||||
|
table: "JellyfinSeason"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinMovie_ItemId", |
||||||
|
table: "JellyfinMovie"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinLibrary_ItemId", |
||||||
|
table: "JellyfinLibrary"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinEpisode_ItemId", |
||||||
|
table: "JellyfinEpisode"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_JellyfinCollection_ItemId", |
||||||
|
table: "JellyfinCollection"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue