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