using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace IM_API.Migrations { /// public partial class updateuploadtask : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.RenameTable( name: "UploadTasks", newName: "upload_tasks"); migrationBuilder.AlterTable( name: "upload_tasks") .Annotation("MySql:CharSet", "utf8mb4") .Annotation("Relational:Collation", "utf8mb4_general_ci") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "StorageProvider", table: "upload_tasks", type: "longtext", nullable: false, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "ProviderUploadId", table: "upload_tasks", type: "longtext", nullable: true, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "ObjectName", table: "upload_tasks", type: "longtext", nullable: false, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "FileName", table: "upload_tasks", type: "longtext", nullable: false, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "FileHash", table: "upload_tasks", type: "longtext", nullable: false, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); migrationBuilder.AlterColumn( name: "ContentType", table: "upload_tasks", type: "longtext", nullable: false, collation: "utf8mb4_general_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "latin1") .OldAnnotation("Relational:Collation", "latin1_swedish_ci"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.RenameTable( name: "upload_tasks", newName: "UploadTasks"); migrationBuilder.AlterTable( name: "UploadTasks") .Annotation("MySql:CharSet", "latin1") .Annotation("Relational:Collation", "latin1_swedish_ci") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "StorageProvider", table: "UploadTasks", type: "longtext", nullable: false, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "ProviderUploadId", table: "UploadTasks", type: "longtext", nullable: true, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "ObjectName", table: "UploadTasks", type: "longtext", nullable: false, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "FileName", table: "UploadTasks", type: "longtext", nullable: false, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "FileHash", table: "UploadTasks", type: "longtext", nullable: false, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); migrationBuilder.AlterColumn( name: "ContentType", table: "UploadTasks", type: "longtext", nullable: false, collation: "latin1_swedish_ci", oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "latin1") .OldAnnotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "utf8mb4_general_ci"); } } }