using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Bit.MySqlMigrations.Migrations; /// public partial class ACCESSPOLICY_ADD_DELETE_CASCADE : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_AccessPolicy_Group_GroupId", table: "AccessPolicy"); migrationBuilder.DropForeignKey( name: "FK_AccessPolicy_Project_GrantedProjectId", table: "AccessPolicy"); migrationBuilder.AddForeignKey( name: "FK_AccessPolicy_Group_GroupId", table: "AccessPolicy", column: "GroupId", principalTable: "Group", principalColumn: "Id", onDelete: ReferentialAction.Cascade); migrationBuilder.AddForeignKey( name: "FK_AccessPolicy_Project_GrantedProjectId", table: "AccessPolicy", column: "GrantedProjectId", principalTable: "Project", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_AccessPolicy_Group_GroupId", table: "AccessPolicy"); migrationBuilder.DropForeignKey( name: "FK_AccessPolicy_Project_GrantedProjectId", table: "AccessPolicy"); migrationBuilder.AddForeignKey( name: "FK_AccessPolicy_Group_GroupId", table: "AccessPolicy", column: "GroupId", principalTable: "Group", principalColumn: "Id"); migrationBuilder.AddForeignKey( name: "FK_AccessPolicy_Project_GrantedProjectId", table: "AccessPolicy", column: "GrantedProjectId", principalTable: "Project", principalColumn: "Id"); } }