bissl formattiert
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class VehicleDistanceDriven : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "DistanceDriven",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DistanceDriven",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "DistanceDriven",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DistanceDriven",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class VehicleTank : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "TankAmount",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TankAmount",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "TankAmount",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TankAmount",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,32 +4,32 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class ATM : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ATMs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Balance = table.Column<int>(nullable: false),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false),
|
||||
Faulty = table.Column<bool>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ATMs", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ATMs");
|
||||
}
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ATMs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Balance = table.Column<int>(nullable: false),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false),
|
||||
Faulty = table.Column<bool>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ATMs", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ATMs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class Handmoney : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Handmoney",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Handmoney",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Handmoney",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Handmoney",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,29 +4,29 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class TuningGarage : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TuningGarages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TuningGarages", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TuningGarages");
|
||||
}
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TuningGarages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TuningGarages", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TuningGarages");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,125 +4,125 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class Groups : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupRank",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupRank",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupId",
|
||||
table: "ServerVehicles",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "GroupId",
|
||||
table: "ServerVehicles",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Groups",
|
||||
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_Groups", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Groups",
|
||||
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_Groups", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GroupBankAccounts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
GroupId = table.Column<int>(nullable: true),
|
||||
Balance = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GroupBankAccounts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_GroupBankAccounts_Groups_GroupId",
|
||||
column: x => x.GroupId,
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GroupBankAccounts",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
GroupId = table.Column<int>(nullable: true),
|
||||
Balance = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GroupBankAccounts", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_GroupBankAccounts_Groups_GroupId",
|
||||
column: x => x.GroupId,
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Users_GroupId",
|
||||
table: "Users",
|
||||
column: "GroupId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Users_GroupId",
|
||||
table: "Users",
|
||||
column: "GroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServerVehicles_GroupId",
|
||||
table: "ServerVehicles",
|
||||
column: "GroupId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServerVehicles_GroupId",
|
||||
table: "ServerVehicles",
|
||||
column: "GroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GroupBankAccounts_GroupId",
|
||||
table: "GroupBankAccounts",
|
||||
column: "GroupId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_GroupBankAccounts_GroupId",
|
||||
table: "GroupBankAccounts",
|
||||
column: "GroupId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ServerVehicles_Groups_GroupId",
|
||||
table: "ServerVehicles",
|
||||
column: "GroupId",
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ServerVehicles_Groups_GroupId",
|
||||
table: "ServerVehicles",
|
||||
column: "GroupId",
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Users_Groups_GroupId",
|
||||
table: "Users",
|
||||
column: "GroupId",
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServerVehicles_Groups_GroupId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Users_Groups_GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "GroupBankAccounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Groups");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Users_GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ServerVehicles_GroupId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupRank",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Users_Groups_GroupId",
|
||||
table: "Users",
|
||||
column: "GroupId",
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServerVehicles_Groups_GroupId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Users_Groups_GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "GroupBankAccounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Groups");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Users_GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ServerVehicles_GroupId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupRank",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GroupId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class UnusedColumnRemove : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShopId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ShopId",
|
||||
table: "ServerVehicles",
|
||||
nullable: true);
|
||||
}
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShopId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ShopId",
|
||||
table: "ServerVehicles",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,87 +4,87 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class Jobs : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JobId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JobId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JobId",
|
||||
table: "ServerVehicles",
|
||||
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.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_Users_JobId",
|
||||
table: "Users",
|
||||
column: "JobId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ServerVehicles_JobId",
|
||||
table: "ServerVehicles",
|
||||
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_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");
|
||||
}
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,69 +4,69 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class JobFix : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServerVehicles_Jobs_JobId",
|
||||
table: "ServerVehicles");
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServerVehicles_Jobs_JobId",
|
||||
table: "ServerVehicles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Users_Jobs_JobId",
|
||||
table: "Users");
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Users_Jobs_JobId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Jobs");
|
||||
migrationBuilder.DropTable(
|
||||
name: "Jobs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Users_JobId",
|
||||
table: "Users");
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Users_JobId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ServerVehicles_JobId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
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);
|
||||
}
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ServerVehicles_JobId",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class ClothesTexture : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Texture",
|
||||
table: "CharacterClothes",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Texture",
|
||||
table: "CharacterClothes");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Texture",
|
||||
table: "CharacterClothes",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Texture",
|
||||
table: "CharacterClothes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class PlayerWanteds : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Wanteds",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Wanteds",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Wanteds",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Wanteds",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,50 +4,50 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class House : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "HouseId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "HouseId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Houses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Type = table.Column<string>(nullable: true),
|
||||
Price = table.Column<int>(nullable: false),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Houses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Houses_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Houses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Type = table.Column<string>(nullable: true),
|
||||
Price = table.Column<int>(nullable: false),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Houses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Houses_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HouseId",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HouseId",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,41 +3,41 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class HousePosition : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "X",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "X",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Y",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Y",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Z",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "X",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Y",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Z",
|
||||
table: "Houses");
|
||||
}
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Z",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "X",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Y",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Z",
|
||||
table: "Houses");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class UserHouseReference : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Users_Houses_HouseId",
|
||||
table: "Users",
|
||||
column: "HouseId",
|
||||
principalTable: "Houses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Users_Houses_HouseId",
|
||||
table: "Users",
|
||||
column: "HouseId",
|
||||
principalTable: "Houses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class UserWage : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Wage",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Wage",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Wage",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Wage",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,58 +4,58 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class BusRoutes : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusRoutes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusRoutes", x => x.Id);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusRoutes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusRoutes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusRoutesPoints",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false),
|
||||
BusRouteId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusRoutesPoints", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BusRoutesPoints_BusRoutes_BusRouteId",
|
||||
column: x => x.BusRouteId,
|
||||
principalTable: "BusRoutes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusRoutesPoints",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false),
|
||||
BusRouteId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusRoutesPoints", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BusRoutesPoints_BusRoutes_BusRouteId",
|
||||
column: x => x.BusRouteId,
|
||||
principalTable: "BusRoutes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BusRoutesPoints_BusRouteId",
|
||||
table: "BusRoutesPoints",
|
||||
column: "BusRouteId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusRoutesPoints");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusRoutes");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BusRoutesPoints_BusRouteId",
|
||||
table: "BusRoutesPoints",
|
||||
column: "BusRouteId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusRoutesPoints");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusRoutes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,41 +3,41 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class UserHouseReferenceFix : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OwnerId",
|
||||
table: "Houses",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OwnerId",
|
||||
table: "Houses",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_OwnerId",
|
||||
table: "Houses",
|
||||
column: "OwnerId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_OwnerId",
|
||||
table: "Houses",
|
||||
column: "OwnerId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Houses_Users_OwnerId",
|
||||
table: "Houses",
|
||||
column: "OwnerId",
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Houses_Users_OwnerId",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Houses_OwnerId",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OwnerId",
|
||||
table: "Houses");
|
||||
}
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Houses_Users_OwnerId",
|
||||
table: "Houses",
|
||||
column: "OwnerId",
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Houses_Users_OwnerId",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Houses_OwnerId",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OwnerId",
|
||||
table: "Houses");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class JailTime : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JailTime",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JailTime",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "JailTime",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JailTime",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class PaydayTimer : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PaydayTimer",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PaydayTimer",
|
||||
table: "Users");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "PaydayTimer",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PaydayTimer",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,41 +4,41 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class FactionWeapons : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FactionWeapons",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
FactionId = table.Column<int>(nullable: false),
|
||||
WeaponModel = table.Column<string>(nullable: true),
|
||||
SlotID = table.Column<int>(nullable: false),
|
||||
Rank = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FactionWeapons", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_FactionWeapons_Factions_FactionId",
|
||||
column: x => x.FactionId,
|
||||
principalTable: "Factions",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FactionWeapons",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
FactionId = table.Column<int>(nullable: false),
|
||||
WeaponModel = table.Column<string>(nullable: true),
|
||||
SlotID = table.Column<int>(nullable: false),
|
||||
Rank = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FactionWeapons", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_FactionWeapons_Factions_FactionId",
|
||||
column: x => x.FactionId,
|
||||
principalTable: "Factions",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FactionWeapons_FactionId",
|
||||
table: "FactionWeapons",
|
||||
column: "FactionId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "FactionWeapons");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_FactionWeapons_FactionId",
|
||||
table: "FactionWeapons",
|
||||
column: "FactionId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "FactionWeapons");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class VehicleLivery : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Livery",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Livery",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Livery",
|
||||
table: "ServerVehicles",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Livery",
|
||||
table: "ServerVehicles");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,70 +4,70 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class HouseEnhancments : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CanRentIn",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CanRentIn",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "RentalFee",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "RentalFee",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "HouseRentals",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
HouseId = table.Column<int>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_HouseRentals", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Houses_HouseId",
|
||||
column: x => x.HouseId,
|
||||
principalTable: "Houses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "HouseRentals",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
HouseId = table.Column<int>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_HouseRentals", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Houses_HouseId",
|
||||
column: x => x.HouseId,
|
||||
principalTable: "Houses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_HouseId",
|
||||
table: "HouseRentals",
|
||||
column: "HouseId");
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_HouseId",
|
||||
table: "HouseRentals",
|
||||
column: "HouseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_UserId",
|
||||
table: "HouseRentals",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "HouseRentals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CanRentIn",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RentalFee",
|
||||
table: "Houses");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_UserId",
|
||||
table: "HouseRentals",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "HouseRentals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CanRentIn",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RentalFee",
|
||||
table: "Houses");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,41 +4,41 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class VehicleItems : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "VehicleItems",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ItemId = table.Column<int>(nullable: false),
|
||||
VehicleId = table.Column<int>(nullable: false),
|
||||
Amount = table.Column<int>(nullable: false),
|
||||
Slot = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_VehicleItems", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_VehicleItems_ServerVehicles_VehicleId",
|
||||
column: x => x.VehicleId,
|
||||
principalTable: "ServerVehicles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "VehicleItems",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ItemId = table.Column<int>(nullable: false),
|
||||
VehicleId = table.Column<int>(nullable: false),
|
||||
Amount = table.Column<int>(nullable: false),
|
||||
Slot = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_VehicleItems", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_VehicleItems_ServerVehicles_VehicleId",
|
||||
column: x => x.VehicleId,
|
||||
principalTable: "ServerVehicles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_VehicleItems_VehicleId",
|
||||
table: "VehicleItems",
|
||||
column: "VehicleId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "VehicleItems");
|
||||
}
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_VehicleItems_VehicleId",
|
||||
table: "VehicleItems",
|
||||
column: "VehicleId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "VehicleItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,28 +4,28 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class BusinessData : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusinessData",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
BusinessId = table.Column<int>(nullable: false),
|
||||
Price = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusinessData", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusinessData");
|
||||
}
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BusinessData",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
BusinessId = table.Column<int>(nullable: false),
|
||||
Price = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BusinessData", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BusinessData");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user