using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SCHALE.Common.Migrations.SqlServerMigrations
{
///
public partial class Gears : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Gears",
columns: table => new
{
ServerId = table.Column(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
AccountServerId = table.Column(type: "bigint", nullable: false),
UniqueId = table.Column(type: "bigint", nullable: false),
Level = table.Column(type: "int", nullable: false),
Exp = table.Column(type: "bigint", nullable: false),
Tier = table.Column(type: "int", nullable: false),
SlotIndex = table.Column(type: "bigint", nullable: false),
BoundCharacterServerId = table.Column(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Gears", x => x.ServerId);
table.ForeignKey(
name: "FK_Gears_Accounts_AccountServerId",
column: x => x.AccountServerId,
principalTable: "Accounts",
principalColumn: "ServerId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Gears_AccountServerId",
table: "Gears",
column: "AccountServerId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Gears");
}
}
}