YD_SmartSports.Api/VOL.Core/Migrations/20240521013552_init010.cs

60 lines
2.9 KiB
C#
Raw Normal View History

2025-06-06 16:00:39 +08:00
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<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
Code = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"),
Name = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "AI设备名称"),
DeviceType = table.Column<int>(type: "int", nullable: false, comment: "设备类型"),
Remarks = table.Column<string>(type: "text", nullable: true, comment: "备注"),
Creator = table.Column<int>(type: "int", nullable: false, comment: "创建人"), // Removed misplaced closing parenthesis
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
Modifier = table.Column<int>(type: "int", nullable: false, comment: "修改人"), // Removed misplaced closing parenthesis
ModifyDate = table.Column<DateTime>(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<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
Code = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"),
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "学校编号"),
Creator = table.Column<int>(type: "int", nullable: false, comment: "创建人"), // Removed misplaced closing parenthesis
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
Modifier = table.Column<int>(type: "int", nullable: false, comment: "修改人"), // Removed misplaced closing parenthesis
ModifyDate = table.Column<DateTime>(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");
}
}
}