using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SOR.Database.Migrations.Game
{
///
public partial class AddCustomLobbyHexSides : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "HexSides",
schema: "game",
table: "game_rule_sets",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 0);
migrationBuilder.AlterColumn(
name: "GridType",
schema: "game",
table: "game_rule_sets",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldDefaultValue: "Square");
migrationBuilder.AddColumn(
name: "HexSidesOverride",
schema: "game",
table: "custom_lobbies",
type: "integer",
nullable: true);
migrationBuilder.AlterColumn(
name: "HexSides",
schema: "game",
table: "board_templates",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 0);
migrationBuilder.AlterColumn(
name: "GridType",
schema: "game",
table: "board_templates",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldDefaultValue: "Square");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "HexSidesOverride",
schema: "game",
table: "custom_lobbies");
migrationBuilder.AlterColumn(
name: "HexSides",
schema: "game",
table: "game_rule_sets",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "GridType",
schema: "game",
table: "game_rule_sets",
type: "text",
nullable: false,
defaultValue: "Square",
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "HexSides",
schema: "game",
table: "board_templates",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn(
name: "GridType",
schema: "game",
table: "board_templates",
type: "text",
nullable: false,
defaultValue: "Square",
oldClrType: typeof(string),
oldType: "text");
}
}
}