hrms-api-backend/BMA.EHR.Infrastructure/Migrations/DisciplineDb/20240115030653_update table DisciplineDisciplinary_DirectorInvestigates datestart nullable3.cs

52 lines
1.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb
{
/// <inheritdoc />
public partial class updatetableDisciplineDisciplinary_DirectorInvestigatesdatestartnullable3 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "DisciplineDisciplinaryId",
table: "DisciplineReport_Profiles",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci");
migrationBuilder.CreateIndex(
name: "IX_DisciplineReport_Profiles_DisciplineDisciplinaryId",
table: "DisciplineReport_Profiles",
column: "DisciplineDisciplinaryId");
migrationBuilder.AddForeignKey(
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinarys_Discipline~",
table: "DisciplineReport_Profiles",
column: "DisciplineDisciplinaryId",
principalTable: "DisciplineDisciplinarys",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DisciplineReport_Profiles_DisciplineDisciplinarys_Discipline~",
table: "DisciplineReport_Profiles");
migrationBuilder.DropIndex(
name: "IX_DisciplineReport_Profiles_DisciplineDisciplinaryId",
table: "DisciplineReport_Profiles");
migrationBuilder.DropColumn(
name: "DisciplineDisciplinaryId",
table: "DisciplineReport_Profiles");
}
}
}