50 lines
1.9 KiB
C#
50 lines
1.9 KiB
C#
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SystemRevivalServer.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddDungeonBeltItems : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "dungeon_belt_items",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<ulong>(type: "bigint unsigned", nullable: false)
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
CharacterId = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
|
SlotIndex = table.Column<int>(type: "int", nullable: false),
|
|
InventorySlotIndex = table.Column<int>(type: "int", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_dungeon_belt_items", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_dungeon_belt_items_dungeon_characters_CharacterId",
|
|
column: x => x.CharacterId,
|
|
principalTable: "dungeon_characters",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_dungeon_belt_items_CharacterId",
|
|
table: "dungeon_belt_items",
|
|
column: "CharacterId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "dungeon_belt_items");
|
|
}
|
|
}
|
|
}
|