Change to static skin catalog population
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user