71 lines
2.9 KiB
C#
71 lines
2.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace VOL.Core.Migrations
|
|
{
|
|
public partial class _20250617v1 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Y_SchoolAccountApplication",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
SchoolName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "学校名称"),
|
|
SchoolAddress = table.Column<string>(type: "nvarchar(1000)", nullable: true, comment: "学校地址"),
|
|
UserName = table.Column<string>(type: "nvarchar(2000)", nullable: true, comment: "用户姓名"),
|
|
PhoneNo = table.Column<string>(type: "nvarchar(11)", nullable: true, comment: "联系电话"),
|
|
Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
|
|
VisitingTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "来访时间"),
|
|
UpdateTime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最后修改时间"),
|
|
Remarks = table.Column<string>(type: "text", nullable: true, comment: "备注")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Y_SchoolAccountApplication", x => x.Id);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Y_StadiumResource_Y_Stadium_StadiumId",
|
|
table: "Y_StadiumResource");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "Y_SchoolAccountApplication");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "PhoneNo",
|
|
table: "Y_StadiumVisiting",
|
|
type: "nvarchar(2000)",
|
|
nullable: true,
|
|
comment: "联系电话",
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(11)",
|
|
oldNullable: true,
|
|
oldComment: "联系电话");
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "StadiumId",
|
|
table: "Y_StadiumResource",
|
|
type: "int",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "int",
|
|
oldComment: "场馆Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Y_StadiumResource_Y_Stadium_StadiumId",
|
|
table: "Y_StadiumResource",
|
|
column: "StadiumId",
|
|
principalTable: "Y_Stadium",
|
|
principalColumn: "Id");
|
|
}
|
|
}
|
|
}
|