using Microsoft.EntityFrameworkCore.Migrations; namespace Ewide.Database.Migrations.Migrations { public partial class Init20210425a : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Success", table: "sys_log_vis", type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否执行成功", oldClrType: typeof(string), oldType: "longtext CHARACTER SET utf8mb4", oldNullable: true, oldComment: "是否执行成功"); migrationBuilder.CreateTable( name: "ewide_area_number", columns: table => new { Code = table.Column(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "系统使用的区域代码"), ShowCode = table.Column(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "对外使用的区域代码"), Name = table.Column(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "名称"), Note = table.Column(type: "longtext CHARACTER SET utf8mb4", nullable: true, comment: "备注"), LevelType = table.Column(type: "int", nullable: false, comment: "类别"), ParentCode = table.Column(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "父级区域代码"), Sort = table.Column(type: "int", nullable: false, comment: "排序") }, constraints: table => { table.PrimaryKey("PK_ewide_area_number", x => x.Code); }, comment: "区域表"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ewide_area_number"); migrationBuilder.AlterColumn( name: "Success", table: "sys_log_vis", type: "longtext CHARACTER SET utf8mb4", nullable: true, comment: "是否执行成功", oldClrType: typeof(bool), oldType: "tinyint(1)", oldComment: "是否执行成功"); } } }