Init commit surgery branch
This commit is contained in:
@@ -127,6 +127,8 @@ namespace ReallifeGamemode.Database.Entities
|
||||
|
||||
public int warn { get; set; } = 0;
|
||||
|
||||
public bool FreeSurgery { get; set; } = true;
|
||||
|
||||
[NotMapped]
|
||||
public Player Player
|
||||
{
|
||||
|
||||
2176
ReallifeGamemode.Database/Migrations/20210420165544_Surgery.Designer.cs
generated
Normal file
2176
ReallifeGamemode.Database/Migrations/20210420165544_Surgery.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
110
ReallifeGamemode.Database/Migrations/20210420165544_Surgery.cs
Normal file
110
ReallifeGamemode.Database/Migrations/20210420165544_Surgery.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user