52 lines
2.0 KiB
C#
52 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SCHALE.Common.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Weapons : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Weapons",
|
|
columns: table => new
|
|
{
|
|
ServerId = table.Column<long>(type: "bigint", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
AccountServerId = table.Column<long>(type: "bigint", nullable: false),
|
|
UniqueId = table.Column<long>(type: "bigint", nullable: false),
|
|
Level = table.Column<int>(type: "int", nullable: false),
|
|
Exp = table.Column<long>(type: "bigint", nullable: false),
|
|
StarGrade = table.Column<int>(type: "int", nullable: false),
|
|
BoundCharacterServerId = table.Column<long>(type: "bigint", nullable: false),
|
|
IsLocked = table.Column<bool>(type: "bit", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Weapons", x => x.ServerId);
|
|
table.ForeignKey(
|
|
name: "FK_Weapons_Accounts_AccountServerId",
|
|
column: x => x.AccountServerId,
|
|
principalTable: "Accounts",
|
|
principalColumn: "ServerId",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Weapons_AccountServerId",
|
|
table: "Weapons",
|
|
column: "AccountServerId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Weapons");
|
|
}
|
|
}
|
|
}
|