Files
Deluxe-2023-Server-Code/Migrations/20260420073902_progressionAdd.cs
T
Exception 1f113298e0 Movement
2026-05-09 14:31:53 -04:00

57 lines
1.9 KiB
C#

using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DeluxeNET.Migrations
{
/// <inheritdoc />
public partial class progressionAdd : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<long>(
name: "accountId",
table: "Avatars",
type: "bigint",
nullable: true,
oldClrType: typeof(long),
oldType: "bigint");
migrationBuilder.CreateTable(
name: "Progressions",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
PlayerId = table.Column<long>(type: "bigint", nullable: false),
Level = table.Column<int>(type: "int", nullable: false),
XP = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Progressions", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Progressions");
migrationBuilder.AlterColumn<long>(
name: "accountId",
table: "Avatars",
type: "bigint",
nullable: false,
defaultValue: 0L,
oldClrType: typeof(long),
oldType: "bigint",
oldNullable: true);
}
}
}