Limit player name lengths and fix vote UI defaults
This commit is contained in:
80
Data/Migrations/20260202183354_LimitPlayerNameLengths.cs
Normal file
80
Data/Migrations/20260202183354_LimitPlayerNameLengths.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace GameList.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class LimitPlayerNameLengths : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Username",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 24,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 64);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "NormalizedUsername",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 24,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 64);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DisplayName",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 16,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 64,
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Username",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 64,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 24);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "NormalizedUsername",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 64,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 24);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DisplayName",
|
||||
table: "Players",
|
||||
type: "TEXT",
|
||||
maxLength: 64,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 16,
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user