Fix missing database migration
This commit is contained in:
1236
ReallifeGamemode.Server/Migrations/20190721144830_FactionWeapons.Designer.cs
generated
Normal file
1236
ReallifeGamemode.Server/Migrations/20190721144830_FactionWeapons.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,45 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Migrations
|
||||
{
|
||||
public partial class FactionWeapons : Migration
|
||||
{
|
||||
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),
|
||||
WeaponHash = 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,6 +389,28 @@ namespace ReallifeGamemode.Migrations
|
||||
b.ToTable("FactionRanks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionWeapon", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("FactionId");
|
||||
|
||||
b.Property<int>("Rank");
|
||||
|
||||
b.Property<int>("SlotID");
|
||||
|
||||
b.Property<int>("WeaponHash");
|
||||
|
||||
b.Property<string>("WeaponModel");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FactionId");
|
||||
|
||||
b.ToTable("FactionWeapons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GotoPoint", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -851,7 +873,7 @@ namespace ReallifeGamemode.Migrations
|
||||
|
||||
b.Property<string>("Password")
|
||||
.HasMaxLength(64);
|
||||
|
||||
|
||||
b.Property<int>("PaydayTimer");
|
||||
|
||||
b.Property<float>("PositionX");
|
||||
@@ -1093,6 +1115,14 @@ namespace ReallifeGamemode.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionWeapon", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
||||
.WithMany()
|
||||
.HasForeignKey("FactionId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GroupBankAccount", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.Group", "Group")
|
||||
|
||||
Reference in New Issue
Block a user