using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VOL.Core.Migrations { public partial class _20250114v1 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "CreateDate", table: "S_School", type: "datetime", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "创建时间", oldClrType: typeof(DateTime), oldType: "datetime", oldNullable: true, oldComment: "创建时间"); migrationBuilder.CreateTable( name: "XW_ProjectMode", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), ProjectKind = table.Column(type: "int", nullable: false, comment: "ProjectKind"), Name = table.Column(type: "nvarchar(100)", nullable: true, comment: "名称") }, constraints: table => { table.PrimaryKey("PK_XW_ProjectMode", x => x.Id); }); migrationBuilder.CreateTable( name: "XW_TestingProject", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), ProjectId = table.Column(type: "int", nullable: false, comment: "ProjectId"), Name = table.Column(type: "nvarchar(100)", nullable: true, comment: "名称"), IsOpen = table.Column(type: "bit", nullable: false, comment: "IsOpen"), IsShow = table.Column(type: "bit", nullable: false, comment: "IsShow") }, constraints: table => { table.PrimaryKey("PK_XW_TestingProject", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "XW_ProjectMode"); migrationBuilder.DropTable( name: "XW_TestingProject"); migrationBuilder.AlterColumn( name: "CreateDate", table: "S_School", type: "datetime", nullable: true, comment: "创建时间", oldClrType: typeof(DateTime), oldType: "datetime", oldComment: "创建时间"); } } }