update 修改日志表字段类型
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Ewide.Database.Migrations.Migrations
|
||||
{
|
||||
public partial class Init20210425a : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<bool>(
|
||||
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<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "系统使用的区域代码"),
|
||||
ShowCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "对外使用的区域代码"),
|
||||
Name = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: false, comment: "名称"),
|
||||
Note = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true, comment: "备注"),
|
||||
LevelType = table.Column<int>(type: "int", nullable: false, comment: "类别"),
|
||||
ParentCode = table.Column<string>(type: "varchar(10) CHARACTER SET utf8mb4", maxLength: 10, nullable: true, comment: "父级区域代码"),
|
||||
Sort = table.Column<int>(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<string>(
|
||||
name: "Success",
|
||||
table: "sys_log_vis",
|
||||
type: "longtext CHARACTER SET utf8mb4",
|
||||
nullable: true,
|
||||
comment: "是否执行成功",
|
||||
oldClrType: typeof(bool),
|
||||
oldType: "tinyint(1)",
|
||||
oldComment: "是否执行成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user