using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace vendorApproverBackend.Migrations { /// public partial class AllowMultipleAssignments : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_request_renews_users_table_assigned_to_id", table: "request_renews"); migrationBuilder.DropIndex( name: "IX_request_renews_assigned_to_id", table: "request_renews"); migrationBuilder.CreateIndex( name: "IX_request_renews_assigned_to_id", table: "request_renews", column: "assigned_to_id"); migrationBuilder.AddForeignKey( name: "FK_request_renews_users_table_assigned_to_id", table: "request_renews", column: "assigned_to_id", principalTable: "users_table", principalColumn: "user_id", onDelete: ReferentialAction.Restrict); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_request_renews_users_table_assigned_to_id", table: "request_renews"); migrationBuilder.DropIndex( name: "IX_request_renews_assigned_to_id", table: "request_renews"); migrationBuilder.CreateIndex( name: "IX_request_renews_assigned_to_id", table: "request_renews", column: "assigned_to_id", unique: true); migrationBuilder.AddForeignKey( name: "FK_request_renews_users_table_assigned_to_id", table: "request_renews", column: "assigned_to_id", principalTable: "users_table", principalColumn: "user_id"); } } }