using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CaseAccountingDataBaseImplement.Migrations
{
///
public partial class migrSpecializationNullAttempt2 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Lawyers_Specializations_SpecializationId",
table: "Lawyers");
migrationBuilder.AlterColumn(
name: "SpecializationId",
table: "Lawyers",
type: "integer",
nullable: true,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AddForeignKey(
name: "FK_Lawyers_Specializations_SpecializationId",
table: "Lawyers",
column: "SpecializationId",
principalTable: "Specializations",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Lawyers_Specializations_SpecializationId",
table: "Lawyers");
migrationBuilder.AlterColumn(
name: "SpecializationId",
table: "Lawyers",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_Lawyers_Specializations_SpecializationId",
table: "Lawyers",
column: "SpecializationId",
principalTable: "Specializations",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}