using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
#nullable disable
|
|
namespace CMS.Plugin.PipeLineLems.MySQL.Migrations
|
{
|
public partial class InitialCreate : Migration
|
{
|
protected override void Up(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.AlterDatabase()
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateTable(
|
name: "scms_mytestentitynames",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
Code = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "名称")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
|
Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "是否禁用"),
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
|
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
},
|
constraints: table =>
|
{
|
table.PrimaryKey("PK_scms_mytestentitynames", x => x.Id);
|
},
|
comment: "MyTestEntityName")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_mytestentitynames_Name",
|
table: "scms_mytestentitynames",
|
column: "Name");
|
}
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.DropTable(
|
name: "scms_mytestentitynames");
|
}
|
}
|
}
|