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

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 namespace SchoolAgainStudyDataBaseImplements.Migrations
{ {
[DbContext(typeof(SchoolDataBase))] [DbContext(typeof(SchoolDataBase))]
[Migration("20230517172340_NewMigration")] [Migration("20230517182038_NewMigration")]
partial class NewMigration partial class NewMigration
{ {
/// <inheritdoc /> /// <inheritdoc />

View File

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