mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
591 lines
19 KiB
591 lines
19 KiB
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
#nullable disable |
|
|
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
|
{ |
|
/// <inheritdoc /> |
|
public partial class Update_CaseSensitivity : Migration |
|
{ |
|
/// <inheritdoc /> |
|
protected override void Up(MigrationBuilder migrationBuilder) |
|
{ |
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "TraktList", |
|
type: "TEXT", |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "TemplateGroup", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Template", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "SmartCollection", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "ShowMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "RerunCollection", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "ProgramSchedule", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Playlist", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "MultiCollection", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "MovieMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Guid", |
|
table: "MetadataGuid", |
|
type: "varchar(128)", |
|
maxLength: 128, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "FillerPreset", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoTemplateGroup", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoTemplate", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoGroup", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Deco", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Collection", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "ChannelWatermark", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Channel", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "BlockGroup", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Block", |
|
type: "varchar(50)", |
|
maxLength: 50, |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "ArtistMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_TraktList_Name", |
|
table: "TraktList", |
|
column: "Name"); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_ShowMetadata_Title", |
|
table: "ShowMetadata", |
|
column: "Title"); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_RerunCollection_Name", |
|
table: "RerunCollection", |
|
column: "Name", |
|
unique: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_MultiCollection_Name", |
|
table: "MultiCollection", |
|
column: "Name", |
|
unique: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_MovieMetadata_Title", |
|
table: "MovieMetadata", |
|
column: "Title"); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_MetadataGuid_Guid", |
|
table: "MetadataGuid", |
|
column: "Guid"); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_FillerPreset_Name", |
|
table: "FillerPreset", |
|
column: "Name", |
|
unique: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_Collection_Name", |
|
table: "Collection", |
|
column: "Name", |
|
unique: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_ChannelWatermark_Name", |
|
table: "ChannelWatermark", |
|
column: "Name", |
|
unique: true); |
|
|
|
migrationBuilder.CreateIndex( |
|
name: "IX_ArtistMetadata_Title", |
|
table: "ArtistMetadata", |
|
column: "Title"); |
|
} |
|
|
|
/// <inheritdoc /> |
|
protected override void Down(MigrationBuilder migrationBuilder) |
|
{ |
|
migrationBuilder.DropIndex( |
|
name: "IX_TraktList_Name", |
|
table: "TraktList"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_ShowMetadata_Title", |
|
table: "ShowMetadata"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_RerunCollection_Name", |
|
table: "RerunCollection"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_MultiCollection_Name", |
|
table: "MultiCollection"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_MovieMetadata_Title", |
|
table: "MovieMetadata"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_MetadataGuid_Guid", |
|
table: "MetadataGuid"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_FillerPreset_Name", |
|
table: "FillerPreset"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_Collection_Name", |
|
table: "Collection"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_ChannelWatermark_Name", |
|
table: "ChannelWatermark"); |
|
|
|
migrationBuilder.DropIndex( |
|
name: "IX_ArtistMetadata_Title", |
|
table: "ArtistMetadata"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "TraktList", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "TemplateGroup", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Template", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "SmartCollection", |
|
type: "TEXT", |
|
nullable: true, |
|
collation: "NOCASE", |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "ShowMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "RerunCollection", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "ProgramSchedule", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Playlist", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "MultiCollection", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "MovieMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Guid", |
|
table: "MetadataGuid", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(128)", |
|
oldMaxLength: 128, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "FillerPreset", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoTemplateGroup", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoTemplate", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "DecoGroup", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Deco", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Collection", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "ChannelWatermark", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Channel", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "BlockGroup", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Name", |
|
table: "Block", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "varchar(50)", |
|
oldMaxLength: 50, |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
|
|
migrationBuilder.AlterColumn<string>( |
|
name: "Title", |
|
table: "ArtistMetadata", |
|
type: "TEXT", |
|
nullable: true, |
|
oldClrType: typeof(string), |
|
oldType: "TEXT", |
|
oldNullable: true, |
|
oldCollation: "NOCASE"); |
|
} |
|
} |
|
}
|
|
|