72 lines
2.5 KiB
C#
72 lines
2.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class imageDownloadModify : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
//migrationBuilder.DropForeignKey(
|
|
// name: "FK_SubejctVisitDownload_SubjectVisit_SubjectVisitId",
|
|
// table: "SubejctVisitDownload");
|
|
|
|
migrationBuilder.AlterColumn<Guid>(
|
|
name: "SubjectVisitId",
|
|
table: "SubejctVisitDownload",
|
|
type: "uniqueidentifier",
|
|
nullable: true,
|
|
oldClrType: typeof(Guid),
|
|
oldType: "uniqueidentifier");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "DownLoadListStr",
|
|
table: "SubejctVisitDownload",
|
|
type: "nvarchar(max)",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
//migrationBuilder.AddForeignKey(
|
|
// name: "FK_SubejctVisitDownload_SubjectVisit_SubjectVisitId",
|
|
// table: "SubejctVisitDownload",
|
|
// column: "SubjectVisitId",
|
|
// principalTable: "SubjectVisit",
|
|
// principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_SubejctVisitDownload_SubjectVisit_SubjectVisitId",
|
|
table: "SubejctVisitDownload");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DownLoadListStr",
|
|
table: "SubejctVisitDownload");
|
|
|
|
migrationBuilder.AlterColumn<Guid>(
|
|
name: "SubjectVisitId",
|
|
table: "SubejctVisitDownload",
|
|
type: "uniqueidentifier",
|
|
nullable: false,
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
oldClrType: typeof(Guid),
|
|
oldType: "uniqueidentifier",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_SubejctVisitDownload_SubjectVisit_SubjectVisitId",
|
|
table: "SubejctVisitDownload",
|
|
column: "SubjectVisitId",
|
|
principalTable: "SubjectVisit",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|