Init commit surgery branch

This commit is contained in:
VegaZ
2021-04-22 22:24:27 +02:00
parent 2ab112795a
commit 922acd6847
8 changed files with 3000 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,110 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace ReallifeGamemode.Database.Migrations
{
public partial class Surgery : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Users_UserId",
table: "ChatLogs");
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Factions_FactionId",
table: "ChatLogs");
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Groups_GroupId",
table: "ChatLogs");
migrationBuilder.AddColumn<bool>(
name: "FreeSurgery",
table: "Users",
nullable: false,
defaultValue: false);
migrationBuilder.AlterColumn<int>(
name: "UserId",
table: "ChatLogs",
nullable: false,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Users_UserId",
table: "ChatLogs",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Factions_FactionId",
table: "ChatLogs",
column: "FactionId",
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Groups_GroupId",
table: "ChatLogs",
column: "GroupId",
principalTable: "Groups",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Users_UserId",
table: "ChatLogs");
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Factions_FactionId",
table: "ChatLogs");
migrationBuilder.DropForeignKey(
name: "FK_ChatLogs_Groups_GroupId",
table: "ChatLogs");
migrationBuilder.DropColumn(
name: "FreeSurgery",
table: "Users");
migrationBuilder.AlterColumn<int>(
name: "UserId",
table: "ChatLogs",
type: "int",
nullable: true,
oldClrType: typeof(int));
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Users_UserId",
table: "ChatLogs",
column: "UserId",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Factions_FactionId",
table: "ChatLogs",
column: "FactionId",
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_ChatLogs_Groups_GroupId",
table: "ChatLogs",
column: "GroupId",
principalTable: "Groups",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

View File

@@ -1450,6 +1450,9 @@ namespace ReallifeGamemode.Database.Migrations
b.Property<bool>("FlyingLicensePlane")
.HasColumnType("tinyint(1)");
b.Property<bool>("FreeSurgery")
.HasColumnType("tinyint(1)");
b.Property<int?>("GroupId")
.HasColumnType("int");