Limit player name lengths and fix vote UI defaults

This commit is contained in:
2026-02-02 19:39:32 +01:00
parent 1dc67879e5
commit f33545b184
11 changed files with 334 additions and 26 deletions

View 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);
}
}
}