81 lines
2.4 KiB
C#
81 lines
2.4 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|