Files
chess/TURN.Services.Chess/Migrations/20230625160918_Init.cs
T
Aleksandr Popov 171b640230 editorconfig added,
modelbuilder fix for local connString
2023-06-26 08:58:42 +02:00

38 lines
1.3 KiB
C#

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