Fix AddStartingTileRule migration — was generated empty, replaced with correct columns

Previous migration file was empty (generated before entity changes were saved).
Deleted the empty migration, regenerated with correct Up/Down:
- ADD COLUMN StartingRandomTilePct (int, not null, default 0) on game.game_rule_sets
- ADD COLUMN StartingRandomTilePctOverride (int, nullable) on game.custom_lobbies
Applied to production DB.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-20 19:27:22 -04:00
co-authored by Claude Happy
parent aded0f03a0
commit 2a30408c8b
4 changed files with 56 additions and 23 deletions
@@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SOR.Database.Migrations.Game
{
/// <inheritdoc />
public partial class AddStartingTileRule : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
@@ -12,7 +12,7 @@ using SOR.Database.Contexts;
namespace SOR.Database.Migrations.Game
{
[DbContext(typeof(GameDbContext))]
[Migration("20260320221447_AddStartingTileRule")]
[Migration("20260320232627_AddStartingTileRule")]
partial class AddStartingTileRule
{
/// <inheritdoc />
@@ -114,6 +114,9 @@ namespace SOR.Database.Migrations.Game
b.Property<bool?>("SpHasCapOverride")
.HasColumnType("boolean");
b.Property<int?>("StartingRandomTilePctOverride")
.HasColumnType("integer");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
@@ -243,6 +246,9 @@ namespace SOR.Database.Migrations.Game
b.Property<bool>("SpHasCap")
.HasColumnType("boolean");
b.Property<int>("StartingRandomTilePct")
.HasColumnType("integer");
b.Property<int>("TimeLimitMinutes")
.HasColumnType("integer");
@@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SOR.Database.Migrations.Game
{
/// <inheritdoc />
public partial class AddStartingTileRule : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "StartingRandomTilePct",
schema: "game",
table: "game_rule_sets",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "StartingRandomTilePctOverride",
schema: "game",
table: "custom_lobbies",
type: "integer",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "StartingRandomTilePct",
schema: "game",
table: "game_rule_sets");
migrationBuilder.DropColumn(
name: "StartingRandomTilePctOverride",
schema: "game",
table: "custom_lobbies");
}
}
}
@@ -111,6 +111,9 @@ namespace SOR.Database.Migrations.Game
b.Property<bool?>("SpHasCapOverride")
.HasColumnType("boolean");
b.Property<int?>("StartingRandomTilePctOverride")
.HasColumnType("integer");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
@@ -240,6 +243,9 @@ namespace SOR.Database.Migrations.Game
b.Property<bool>("SpHasCap")
.HasColumnType("boolean");
b.Property<int>("StartingRandomTilePct")
.HasColumnType("integer");
b.Property<int>("TimeLimitMinutes")
.HasColumnType("integer");