using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace TURN.Services.Chess.Migrations
{
///
public partial class Init : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Games",
columns: table => new
{
GameId = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
BlackUserName = table.Column(type: "varchar", nullable: true),
WhiteUserName = table.Column(type: "varchar", nullable: true),
StartDate = table.Column(type: "varchar", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Games", x => x.GameId);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Games");
}
}
}