Files
tbd-station-14/Content.Server.Database/Migrations/20200118195640_jobs.cs
2020-01-19 09:42:26 +01:00

43 lines
1.6 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace Content.Server.Database.Migrations
{
public partial class jobs : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Job",
columns: table => new
{
JobId = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
ProfileHumanoidProfileId = table.Column<int>(nullable: false),
JobName = table.Column<string>(nullable: false),
Priority = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Job", x => x.JobId);
table.ForeignKey(
name: "FK_Job_HumanoidProfile_ProfileHumanoidProfileId",
column: x => x.ProfileHumanoidProfileId,
principalTable: "HumanoidProfile",
principalColumn: "HumanoidProfileId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Job_ProfileHumanoidProfileId",
table: "Job",
column: "ProfileHumanoidProfileId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Job");
}
}
}