чтоб все не удалили

This commit is contained in:
ityurner02@mail.ru 2023-05-17 22:22:06 +04:00
parent 43102ea296
commit 9227162239
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ using SchoolAgainStudyDataBaseImplements;
namespace SchoolAgainStudyDataBaseImplements.Migrations
{
[DbContext(typeof(SchoolDataBase))]
[Migration("20230517172340_NewMigration")]
[Migration("20230517182038_NewMigration")]
partial class NewMigration
{
/// <inheritdoc />

View File

@ -155,7 +155,7 @@ namespace SchoolAgainStudyDataBaseImplements.Migrations
column: x => x.ProductId,
principalTable: "Products",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Lessons_Teachers_TeacherId",
column: x => x.TeacherId,
@ -218,7 +218,7 @@ namespace SchoolAgainStudyDataBaseImplements.Migrations
column: x => x.TaskId,
principalTable: "Tasks",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(