This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues/pull-requests.
DotNetServer/Migrations/20241124152636_Initial.cs

63 lines
2.6 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace BHServer.Migrations
{
/// <inheritdoc />
public partial class Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AssaultTroop",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ATId = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "text", nullable: false),
Faction = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<int>(type: "integer", nullable: false),
Province = table.Column<int>(type: "integer", nullable: false),
Orders = table.Column<string>(type: "text", nullable: false),
Owner = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AssaultTroop", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Province",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ProvinceId = table.Column<int>(type: "integer", nullable: false),
Name = table.Column<string>(type: "text", nullable: false),
Faction = table.Column<int>(type: "integer", nullable: false),
Multiplier = table.Column<int>(type: "integer", nullable: false),
ATs = table.Column<string>(type: "text", nullable: false),
State = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Province", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AssaultTroop");
migrationBuilder.DropTable(
name: "Province");
}
}
}