YD_SmartSports.Api/VOL.Core/Migrations/20260402010320_20260402v1.cs

58 lines
2.6 KiB
C#
Raw Normal View History

2026-04-16 13:18:24 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20260402v1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "YL_Device");
migrationBuilder.DropColumn(
name: "EduId",
table: "S_Student");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "EduId",
table: "S_Student",
type: "nvarchar(100)",
nullable: true,
comment: "EduId");
migrationBuilder.CreateTable(
name: "YL_Device",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
AndroidId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
IMEI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IMSI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsActive = table.Column<int>(type: "int", nullable: false),
IsCalibration = table.Column<int>(type: "int", nullable: false),
IsOnline = table.Column<int>(type: "int", nullable: false),
IsSynchronization = table.Column<int>(type: "int", nullable: false),
LastOnlineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
SerialNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SportStationId = table.Column<long>(type: "bigint", nullable: false),
TenantName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_YL_Device", x => x.Id);
});
}
}
}