49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Portfolio.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class updatePokemonChangeIngredient : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.RenameColumn(
|
|
name: "Ingredients",
|
|
table: "Pokemons",
|
|
newName: "Ingredient3");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Ingredient1",
|
|
table: "Pokemons",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Ingredient2",
|
|
table: "Pokemons",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Ingredient1",
|
|
table: "Pokemons");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Ingredient2",
|
|
table: "Pokemons");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "Ingredient3",
|
|
table: "Pokemons",
|
|
newName: "Ingredients");
|
|
}
|
|
}
|
|
}
|