using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ErsatzTV.Infrastructure.MySql.Migrations { /// public partial class Add_MediaFilePathHash : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropIndex( name: "IX_MediaFile_Path", table: "MediaFile"); migrationBuilder.AlterColumn( name: "Path", table: "MediaFile", type: "longtext", nullable: true, oldClrType: typeof(string), oldType: "varchar(255)", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "PathHash", table: "MediaFile", type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "PathHash", table: "MediaFile"); migrationBuilder.AlterColumn( name: "Path", table: "MediaFile", type: "varchar(255)", nullable: true, oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_MediaFile_Path", table: "MediaFile", column: "Path", unique: true); } } }