YD_SmartSports.Api/VOL.Core/Migrations/20250114052950_20250114v1.cs

75 lines
2.8 KiB
C#
Raw Permalink Normal View History

2025-06-06 16:55:14 +08:00
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<DateTime>(
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<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
ProjectKind = table.Column<int>(type: "int", nullable: false, comment: "ProjectKind"),
Name = table.Column<string>(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<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
ProjectId = table.Column<int>(type: "int", nullable: false, comment: "ProjectId"),
Name = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "名称"),
IsOpen = table.Column<bool>(type: "bit", nullable: false, comment: "IsOpen"),
IsShow = table.Column<bool>(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<DateTime>(
name: "CreateDate",
table: "S_School",
type: "datetime",
nullable: true,
comment: "创建时间",
oldClrType: typeof(DateTime),
oldType: "datetime",
oldComment: "创建时间");
}
}
}