95 lines
3.6 KiB
C#
95 lines
3.6 KiB
C#
using System;
|
||
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
||
#nullable disable
|
||
|
||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||
{
|
||
/// <inheritdoc />
|
||
public partial class Hospitalid : Migration
|
||
{
|
||
/// <inheritdoc />
|
||
protected override void Up(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.AlterColumn<Guid>(
|
||
name: "JudgeVisitTaskId",
|
||
table: "VisitTask",
|
||
type: "uniqueidentifier",
|
||
nullable: true,
|
||
comment: "在访视或者全局任务上记录 裁判任务的Id",
|
||
oldClrType: typeof(Guid),
|
||
oldType: "uniqueidentifier",
|
||
oldNullable: true,
|
||
oldComment: "裁判任务的Id");
|
||
|
||
migrationBuilder.AlterColumn<Guid>(
|
||
name: "JudgeResultTaskId",
|
||
table: "VisitTask",
|
||
type: "uniqueidentifier",
|
||
nullable: true,
|
||
comment: "在裁判任务上记录 裁判结果的任务ID(访视或者全局)",
|
||
oldClrType: typeof(Guid),
|
||
oldType: "uniqueidentifier",
|
||
oldNullable: true,
|
||
oldComment: "裁判结果的任务ID(访视或者全局)");
|
||
|
||
migrationBuilder.AddColumn<Guid>(
|
||
name: "HospitalId",
|
||
table: "Postgraduate",
|
||
type: "uniqueidentifier",
|
||
nullable: true);
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_ReadingTableQuestionSystem_ReadingQuestionId",
|
||
table: "ReadingTableQuestionSystem",
|
||
column: "ReadingQuestionId");
|
||
|
||
migrationBuilder.AddForeignKey(
|
||
name: "FK_ReadingTableQuestionSystem_ReadingQuestionSystem_ReadingQuestionId",
|
||
table: "ReadingTableQuestionSystem",
|
||
column: "ReadingQuestionId",
|
||
principalTable: "ReadingQuestionSystem",
|
||
principalColumn: "Id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
}
|
||
|
||
/// <inheritdoc />
|
||
protected override void Down(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.DropForeignKey(
|
||
name: "FK_ReadingTableQuestionSystem_ReadingQuestionSystem_ReadingQuestionId",
|
||
table: "ReadingTableQuestionSystem");
|
||
|
||
migrationBuilder.DropIndex(
|
||
name: "IX_ReadingTableQuestionSystem_ReadingQuestionId",
|
||
table: "ReadingTableQuestionSystem");
|
||
|
||
migrationBuilder.DropColumn(
|
||
name: "HospitalId",
|
||
table: "Postgraduate");
|
||
|
||
migrationBuilder.AlterColumn<Guid>(
|
||
name: "JudgeVisitTaskId",
|
||
table: "VisitTask",
|
||
type: "uniqueidentifier",
|
||
nullable: true,
|
||
comment: "裁判任务的Id",
|
||
oldClrType: typeof(Guid),
|
||
oldType: "uniqueidentifier",
|
||
oldNullable: true,
|
||
oldComment: "在访视或者全局任务上记录 裁判任务的Id");
|
||
|
||
migrationBuilder.AlterColumn<Guid>(
|
||
name: "JudgeResultTaskId",
|
||
table: "VisitTask",
|
||
type: "uniqueidentifier",
|
||
nullable: true,
|
||
comment: "裁判结果的任务ID(访视或者全局)",
|
||
oldClrType: typeof(Guid),
|
||
oldType: "uniqueidentifier",
|
||
oldNullable: true,
|
||
oldComment: "在裁判任务上记录 裁判结果的任务ID(访视或者全局)");
|
||
}
|
||
}
|
||
}
|