Change to static skin catalog population

This commit is contained in:
bob
2026-05-29 18:36:17 -05:00
parent 6f3c0175cd
commit b51f1d9f5f
26 changed files with 3063 additions and 370 deletions

View File

@@ -0,0 +1,87 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BlueLaminate.EFCore.Migrations
{
/// <inheritdoc />
public partial class MakeSkinFloatsNullable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "float_min",
schema: "skintracker",
table: "skins",
type: "numeric(10,9)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "numeric(10,9)",
oldDefaultValue: 0.0m);
migrationBuilder.AlterColumn<decimal>(
name: "float_max",
schema: "skintracker",
table: "skins",
type: "numeric(10,9)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "numeric(10,9)",
oldDefaultValue: 1.0m);
migrationBuilder.AlterColumn<bool>(
name: "true_float",
schema: "skintracker",
table: "skins",
type: "boolean",
nullable: true,
computedColumnSql: "float_min = 0.0 AND float_max = 1.0",
stored: true,
oldClrType: typeof(bool),
oldType: "boolean",
oldComputedColumnSql: "float_min = 0.0 AND float_max = 1.0",
oldStored: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "float_min",
schema: "skintracker",
table: "skins",
type: "numeric(10,9)",
nullable: false,
defaultValue: 0.0m,
oldClrType: typeof(decimal),
oldType: "numeric(10,9)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "float_max",
schema: "skintracker",
table: "skins",
type: "numeric(10,9)",
nullable: false,
defaultValue: 1.0m,
oldClrType: typeof(decimal),
oldType: "numeric(10,9)",
oldNullable: true);
migrationBuilder.AlterColumn<bool>(
name: "true_float",
schema: "skintracker",
table: "skins",
type: "boolean",
nullable: false,
computedColumnSql: "float_min = 0.0 AND float_max = 1.0",
stored: true,
oldClrType: typeof(bool),
oldType: "boolean",
oldNullable: true,
oldComputedColumnSql: "float_min = 0.0 AND float_max = 1.0",
oldStored: true);
}
}
}