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:
@@ -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)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+7
-1
@@ -12,7 +12,7 @@ using SOR.Database.Contexts;
|
|||||||
namespace SOR.Database.Migrations.Game
|
namespace SOR.Database.Migrations.Game
|
||||||
{
|
{
|
||||||
[DbContext(typeof(GameDbContext))]
|
[DbContext(typeof(GameDbContext))]
|
||||||
[Migration("20260320221447_AddStartingTileRule")]
|
[Migration("20260320232627_AddStartingTileRule")]
|
||||||
partial class AddStartingTileRule
|
partial class AddStartingTileRule
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -114,6 +114,9 @@ namespace SOR.Database.Migrations.Game
|
|||||||
b.Property<bool?>("SpHasCapOverride")
|
b.Property<bool?>("SpHasCapOverride")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int?>("StartingRandomTilePctOverride")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Status")
|
b.Property<string>("Status")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@@ -243,6 +246,9 @@ namespace SOR.Database.Migrations.Game
|
|||||||
b.Property<bool>("SpHasCap")
|
b.Property<bool>("SpHasCap")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("StartingRandomTilePct")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("TimeLimitMinutes")
|
b.Property<int>("TimeLimitMinutes")
|
||||||
.HasColumnType("integer");
|
.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")
|
b.Property<bool?>("SpHasCapOverride")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int?>("StartingRandomTilePctOverride")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Status")
|
b.Property<string>("Status")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@@ -240,6 +243,9 @@ namespace SOR.Database.Migrations.Game
|
|||||||
b.Property<bool>("SpHasCap")
|
b.Property<bool>("SpHasCap")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("StartingRandomTilePct")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("TimeLimitMinutes")
|
b.Property<int>("TimeLimitMinutes")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user