mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Content.Server.Database.Migrations.Sqlite
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class JobSubname : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "job_subname",
|
|
columns: table => new
|
|
{
|
|
job_subname_id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
profile_id = table.Column<int>(type: "INTEGER", nullable: false),
|
|
job_name = table.Column<string>(type: "TEXT", nullable: false),
|
|
subname = table.Column<string>(type: "TEXT", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_job_subname", x => x.job_subname_id);
|
|
table.ForeignKey(
|
|
name: "FK_job_subname_profile_profile_id",
|
|
column: x => x.profile_id,
|
|
principalTable: "profile",
|
|
principalColumn: "profile_id",
|
|
onDelete: ReferentialAction.SetNull);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_job_subname_profile_id_job_name",
|
|
table: "job_subname",
|
|
columns: new[] { "profile_id", "job_name" },
|
|
unique: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "job_subname");
|
|
}
|
|
}
|
|
}
|