using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace PokedexApi.Migrations
{
///
public partial class Init : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "type",
columns: table => new
{
type_id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
type_name = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_type", x => x.type_id);
});
migrationBuilder.CreateIndex(
name: "IX_type_type_name",
table: "type",
column: "type_name",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "type");
}
}
}