You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20221124125727_RestrictDelete.cs 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Diligent.WebAPI.Data.Migrations
  4. {
  5. public partial class RestrictDelete : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.DropForeignKey(
  10. name: "FK_SelectionProcesses_AspNetUsers_SchedulerId",
  11. table: "SelectionProcesses");
  12. migrationBuilder.AddForeignKey(
  13. name: "FK_SelectionProcesses_AspNetUsers_SchedulerId",
  14. table: "SelectionProcesses",
  15. column: "SchedulerId",
  16. principalTable: "AspNetUsers",
  17. principalColumn: "Id",
  18. onDelete: ReferentialAction.Restrict);
  19. }
  20. protected override void Down(MigrationBuilder migrationBuilder)
  21. {
  22. migrationBuilder.DropForeignKey(
  23. name: "FK_SelectionProcesses_AspNetUsers_SchedulerId",
  24. table: "SelectionProcesses");
  25. migrationBuilder.AddForeignKey(
  26. name: "FK_SelectionProcesses_AspNetUsers_SchedulerId",
  27. table: "SelectionProcesses",
  28. column: "SchedulerId",
  29. principalTable: "AspNetUsers",
  30. principalColumn: "Id");
  31. }
  32. }
  33. }