YD_SmartSports.Api/VOL.Core/Migrations/20260630070641_2026-06-30v1.cs

77 lines
4.2 KiB
C#
Raw Normal View History

2026-07-07 13:08:28 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20260630v1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "YL_AppVersion",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ApplyName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
DeviceType = table.Column<int>(type: "int", nullable: false),
HardwareType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
OperatingSystem = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
VersionNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
VersionCode = table.Column<int>(type: "int", nullable: false),
NeedForcedUpdating = table.Column<int>(type: "int", nullable: false),
UpdateUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
IsLatest = table.Column<int>(type: "int", nullable: false),
PublishStatus = table.Column<int>(type: "int", nullable: false),
MinSupportVersion = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
UpdateContent = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
FileSize = table.Column<long>(type: "bigint", nullable: true),
FileMd5 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
GrayPercent = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_YL_AppVersion", x => x.Id);
});
migrationBuilder.CreateTable(
name: "YL_DeviceVideo",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
DeviceSerial = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
DeviceType = table.Column<int>(type: "int", nullable: false),
VideoSerial = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
VideoUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
FileName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
FileSize = table.Column<long>(type: "bigint", nullable: true),
Duration = table.Column<int>(type: "int", nullable: true),
Timestamp = table.Column<long>(type: "bigint", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_YL_DeviceVideo", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "YL_AppVersion");
migrationBuilder.DropTable(
name: "YL_DeviceVideo");
}
}
}