mirror of
https://github.com/TbT480jcspy/Deluxe-2023-Server-Code.git
synced 2026-09-08 06:31:26 -07:00
57 lines
1.9 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|