using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace FileStorage.Migrations { public partial class init : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "file_info", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), RealName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Suffix = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Md5Code = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Size = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Path = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Url = table.Column(type: "varchar(256)", maxLength: 256, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Type = table.Column(type: "int", nullable: false), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_file_info", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "file_info"); } } }