Dungeon simulation changes
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SystemRevivalServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DungeonSimulationchanges : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "AnimationFps",
|
||||
table: "tile_definitions",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "AnimationFrameCount",
|
||||
table: "tile_definitions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Biome",
|
||||
table: "tile_definitions",
|
||||
type: "varchar(32)",
|
||||
maxLength: 32,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsAnimated",
|
||||
table: "tile_definitions",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "dungeon_objects",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
SpritePath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
SpriteId = table.Column<int>(type: "int", nullable: true),
|
||||
InteractedSpritePath = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
BlocksMovement = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
BlocksProjectiles = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
BlocksLineOfSight = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
IsInteractable = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
IsDestructible = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
Health = table.Column<int>(type: "int", nullable: false),
|
||||
InteractionType = table.Column<int>(type: "int", nullable: false),
|
||||
LootTableId = table.Column<int>(type: "int", nullable: true),
|
||||
Tags = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Biome = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Width = table.Column<int>(type: "int", nullable: false),
|
||||
Height = table.Column<int>(type: "int", nullable: false),
|
||||
ZIndex = table.Column<int>(type: "int", nullable: false),
|
||||
IsAnimated = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
AnimationFrameCount = table.Column<int>(type: "int", nullable: false),
|
||||
AnimationFps = table.Column<float>(type: "float", nullable: false),
|
||||
IsEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_dungeon_objects", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "dungeon_objects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AnimationFps",
|
||||
table: "tile_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AnimationFrameCount",
|
||||
table: "tile_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Biome",
|
||||
table: "tile_definitions");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsAnimated",
|
||||
table: "tile_definitions");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user