sos
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ConsoleApp1.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class checkAll07 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PokemonStats_pokemon_PokemonId",
|
||||
table: "PokemonStats");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PokemonStats_stat_idStat",
|
||||
table: "PokemonStats");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PokemonId",
|
||||
table: "PokemonStats",
|
||||
newName: "pokemon_id");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "idStat",
|
||||
table: "PokemonStats",
|
||||
newName: "stat_id");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PokemonStats_PokemonId",
|
||||
table: "PokemonStats",
|
||||
newName: "IX_PokemonStats_pokemon_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PokemonStats_pokemon_pokemon_id",
|
||||
table: "PokemonStats",
|
||||
column: "pokemon_id",
|
||||
principalTable: "pokemon",
|
||||
principalColumn: "pokemon_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PokemonStats_stat_stat_id",
|
||||
table: "PokemonStats",
|
||||
column: "stat_id",
|
||||
principalTable: "stat",
|
||||
principalColumn: "stat_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PokemonStats_pokemon_pokemon_id",
|
||||
table: "PokemonStats");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PokemonStats_stat_stat_id",
|
||||
table: "PokemonStats");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "pokemon_id",
|
||||
table: "PokemonStats",
|
||||
newName: "PokemonId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "stat_id",
|
||||
table: "PokemonStats",
|
||||
newName: "idStat");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_PokemonStats_pokemon_id",
|
||||
table: "PokemonStats",
|
||||
newName: "IX_PokemonStats_PokemonId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PokemonStats_pokemon_PokemonId",
|
||||
table: "PokemonStats",
|
||||
column: "PokemonId",
|
||||
principalTable: "pokemon",
|
||||
principalColumn: "pokemon_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PokemonStats_stat_idStat",
|
||||
table: "PokemonStats",
|
||||
column: "idStat",
|
||||
principalTable: "stat",
|
||||
principalColumn: "stat_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user