using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace EntityFramwork.Migrations { /// public partial class test3 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Skins_Champions_ChampionId", table: "Skins"); migrationBuilder.RenameColumn( name: "ChampionId", table: "Skins", newName: "ChampionForeignKey"); migrationBuilder.RenameIndex( name: "IX_Skins_ChampionId", table: "Skins", newName: "IX_Skins_ChampionForeignKey"); migrationBuilder.AddForeignKey( name: "FK_Skins_Champions_ChampionForeignKey", table: "Skins", column: "ChampionForeignKey", principalTable: "Champions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Skins_Champions_ChampionForeignKey", table: "Skins"); migrationBuilder.RenameColumn( name: "ChampionForeignKey", table: "Skins", newName: "ChampionId"); migrationBuilder.RenameIndex( name: "IX_Skins_ChampionForeignKey", table: "Skins", newName: "IX_Skins_ChampionId"); migrationBuilder.AddForeignKey( name: "FK_Skins_Champions_ChampionId", table: "Skins", column: "ChampionId", principalTable: "Champions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } } }