using Microsoft.EntityFrameworkCore.Migrations; using System; #nullable disable namespace VOL.Core.Migrations { public partial class init010 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Ai_Device", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"), Name = table.Column(type: "nvarchar(200)", nullable: true, comment: "AI设备名称"), DeviceType = table.Column(type: "int", nullable: false, comment: "设备类型"), Remarks = table.Column(type: "text", nullable: true, comment: "备注"), Creator = table.Column(type: "int", nullable: false, comment: "创建人"), // Removed misplaced closing parenthesis CreateDate = table.Column(type: "datetime", nullable: true, comment: "创建时间"), Modifier = table.Column(type: "int", nullable: false, comment: "修改人"), // Removed misplaced closing parenthesis ModifyDate = table.Column(type: "datetime", nullable: true, comment: "修改时间") }, constraints: table => { table.PrimaryKey("PK_Ai_Device", x => x.Id); }); migrationBuilder.CreateTable( name: "Ai_DeviceAssocSchool", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"), SchoolCode = table.Column(type: "nvarchar(100)", nullable: true, comment: "学校编号"), Creator = table.Column(type: "int", nullable: false, comment: "创建人"), // Removed misplaced closing parenthesis CreateDate = table.Column(type: "datetime", nullable: true, comment: "创建时间"), Modifier = table.Column(type: "int", nullable: false, comment: "修改人"), // Removed misplaced closing parenthesis ModifyDate = table.Column(type: "datetime", nullable: true, comment: "修改时间") }, constraints: table => { table.PrimaryKey("PK_Ai_DeviceAssocSchool", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Ai_Device"); migrationBuilder.DropTable( name: "Ai_DeviceAssocSchool"); } } }