76 lines
3.1 KiB
C#
76 lines
3.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SystemRevivalServer.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ResistanceSystemtweaks : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ResistancesJson",
|
|
table: "dungeon_item_definitions",
|
|
type: "varchar(1024)",
|
|
maxLength: 1024,
|
|
nullable: false,
|
|
defaultValue: "")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ResistancesJson",
|
|
table: "dungeon_characters",
|
|
type: "varchar(1024)",
|
|
maxLength: 1024,
|
|
nullable: false,
|
|
defaultValue: "")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "damage_resistance_types",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
Key = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
DisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Color = table.Column<string>(type: "varchar(16)", maxLength: 16, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
IconPath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
SortOrder = table.Column<int>(type: "int", nullable: false),
|
|
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_damage_resistance_types", x => x.Id);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "damage_resistance_types");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ResistancesJson",
|
|
table: "dungeon_item_definitions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ResistancesJson",
|
|
table: "dungeon_characters");
|
|
}
|
|
}
|
|
}
|