Timothy Schenk
1363ddf8fe
Some checks failed
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 25s
Build, Package and Push Images / sbom-scan (push) Successful in 35s
Build, Package and Push Images / container-build (push) Failing after 56s
Build, Package and Push Images / container-sbom-scan (push) Has been skipped
Build, Package and Push Images / sonarqube (push) Successful in 1m20s
157 lines
4.3 KiB
C#
157 lines
4.3 KiB
C#
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Server.DB.Migrations;
|
|
|
|
/// <inheritdoc />
|
|
public partial class AdditionalCharacterData : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "ItemId",
|
|
table: "InventoryItem",
|
|
type: "integer",
|
|
nullable: false,
|
|
oldClrType: typeof(short),
|
|
oldType: "smallint");
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Dexterity",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Intelligence",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Luck",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Strength",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Vitality",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<short>(
|
|
name: "BaseStats_Wisdom",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Health",
|
|
table: "Characters",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<byte>(
|
|
name: "JobData_FirstJob",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<byte>(
|
|
name: "JobData_FourthJob",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<byte>(
|
|
name: "JobData_SecondJob",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<byte>(
|
|
name: "JobData_ThirdJob",
|
|
table: "Characters",
|
|
type: "smallint",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Mana",
|
|
table: "Characters",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Dexterity",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Intelligence",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Luck",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Strength",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Vitality",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "BaseStats_Wisdom",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Health",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobData_FirstJob",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobData_FourthJob",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobData_SecondJob",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobData_ThirdJob",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Mana",
|
|
table: "Characters");
|
|
|
|
migrationBuilder.AlterColumn<short>(
|
|
name: "ItemId",
|
|
table: "InventoryItem",
|
|
type: "smallint",
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "integer");
|
|
}
|
|
}
|