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(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Code = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "编码") .Annotation("MySql:CharSet", "utf8mb4"), Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "名称") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), Remark = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), 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(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(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"); } } }