tweaks
This commit is contained in:
+1639
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,6 +81,30 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<ulong>("Id"));
|
||||
|
||||
b.Property<ulong>("CharacterId")
|
||||
.HasColumnType("bigint unsigned");
|
||||
|
||||
b.Property<int>("InventorySlotIndex")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SlotIndex")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CharacterId");
|
||||
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
@@ -1372,6 +1396,17 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
|
||||
Reference in New Issue
Block a user