Fix hex migration column names to PascalCase (match existing DB convention)
DB columns are PascalCase (e.g. BoardWidth, not board_width). The previous migration used snake_case names — renamed grid_type→GridType and hex_sides→HexSides on pg-forge-01, and updated the migration file to match so future re-runs are correct. 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:
@@ -11,7 +11,7 @@ namespace SOR.Database.Migrations.Game
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "grid_type",
|
||||
name: "GridType",
|
||||
schema: "game",
|
||||
table: "game_rule_sets",
|
||||
type: "text",
|
||||
@@ -19,7 +19,7 @@ namespace SOR.Database.Migrations.Game
|
||||
defaultValue: "Square");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "hex_sides",
|
||||
name: "HexSides",
|
||||
schema: "game",
|
||||
table: "game_rule_sets",
|
||||
type: "integer",
|
||||
@@ -27,7 +27,7 @@ namespace SOR.Database.Migrations.Game
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "grid_type",
|
||||
name: "GridType",
|
||||
schema: "game",
|
||||
table: "board_templates",
|
||||
type: "text",
|
||||
@@ -35,7 +35,7 @@ namespace SOR.Database.Migrations.Game
|
||||
defaultValue: "Square");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "hex_sides",
|
||||
name: "HexSides",
|
||||
schema: "game",
|
||||
table: "board_templates",
|
||||
type: "integer",
|
||||
@@ -46,10 +46,10 @@ namespace SOR.Database.Migrations.Game
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(name: "grid_type", schema: "game", table: "game_rule_sets");
|
||||
migrationBuilder.DropColumn(name: "hex_sides", schema: "game", table: "game_rule_sets");
|
||||
migrationBuilder.DropColumn(name: "grid_type", schema: "game", table: "board_templates");
|
||||
migrationBuilder.DropColumn(name: "hex_sides", schema: "game", table: "board_templates");
|
||||
migrationBuilder.DropColumn(name: "GridType", schema: "game", table: "game_rule_sets");
|
||||
migrationBuilder.DropColumn(name: "HexSides", schema: "game", table: "game_rule_sets");
|
||||
migrationBuilder.DropColumn(name: "GridType", schema: "game", table: "board_templates");
|
||||
migrationBuilder.DropColumn(name: "HexSides", schema: "game", table: "board_templates");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user