File diff suppressed because it is too large
Load Diff
@@ -1,90 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Migrations
|
||||
{
|
||||
public partial class Jobs : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JobId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JobId",
|
||||
table: "ServerVehicles",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Jobs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Jobs", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Users_JobId",
|
||||
table: "Users",
|
||||
column: "JobId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServerVehicles_JobId",
|
||||
table: "ServerVehicles",
|
||||
column: "JobId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ServerVehicles_Jobs_JobId",
|
||||
table: "ServerVehicles",
|
||||
column: "JobId",
|
||||
principalTable: "Jobs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Users_Jobs_JobId",
|
||||
table: "Users",
|
||||
column: "JobId",
|
||||
principalTable: "Jobs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServerVehicles_Jobs_JobId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Users_Jobs_JobId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Jobs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Users_JobId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ServerVehicles_JobId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JobId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JobId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -420,18 +420,6 @@ namespace ReallifeGamemode.Migrations
|
||||
b.ToTable("Interiors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Job", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Jobs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Logs.BankAccountTransactionHistory", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -790,8 +778,6 @@ namespace ReallifeGamemode.Migrations
|
||||
|
||||
b.Property<int>("Handmoney");
|
||||
|
||||
b.Property<int?>("JobId");
|
||||
|
||||
b.Property<int>("LogUserId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
@@ -827,8 +813,6 @@ namespace ReallifeGamemode.Migrations
|
||||
|
||||
b.HasIndex("GroupId");
|
||||
|
||||
b.HasIndex("JobId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
@@ -931,17 +915,6 @@ namespace ReallifeGamemode.Migrations
|
||||
b.HasDiscriminator().HasValue("GroupVehicle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.JobVehicle", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Server.Entities.ServerVehicle");
|
||||
|
||||
b.Property<int?>("JobId");
|
||||
|
||||
b.HasIndex("JobId");
|
||||
|
||||
b.HasDiscriminator().HasValue("JobVehicle");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Saves.SavedVehicle", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Server.Entities.ServerVehicle");
|
||||
@@ -1077,10 +1050,6 @@ namespace ReallifeGamemode.Migrations
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.Group", "Group")
|
||||
.WithMany()
|
||||
.HasForeignKey("GroupId");
|
||||
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.Job", "Job")
|
||||
.WithMany()
|
||||
.HasForeignKey("JobId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserBankAccount", b =>
|
||||
@@ -1121,13 +1090,6 @@ namespace ReallifeGamemode.Migrations
|
||||
.HasForeignKey("GroupId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.JobVehicle", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.Job", "Job")
|
||||
.WithMany()
|
||||
.HasForeignKey("JobId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserVehicle", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
||||
|
||||
Reference in New Issue
Block a user