rank endpoint done
This commit is contained in:
1117
TOOHUCardAPI/Migrations/20211107145740_new fields.Designer.cs
generated
Normal file
1117
TOOHUCardAPI/Migrations/20211107145740_new fields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
71
TOOHUCardAPI/Migrations/20211107145740_new fields.cs
Normal file
71
TOOHUCardAPI/Migrations/20211107145740_new fields.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
public partial class newfields : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AccountId",
|
||||
table: "RankEntries");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Username",
|
||||
table: "RankEntries");
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "AccountId",
|
||||
table: "Users",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Username",
|
||||
table: "Users",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<float>(
|
||||
name: "Damage",
|
||||
table: "RankEntries",
|
||||
type: "real",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AccountId",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Username",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "Damage",
|
||||
table: "RankEntries",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(float),
|
||||
oldType: "real");
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "AccountId",
|
||||
table: "RankEntries",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Username",
|
||||
table: "RankEntries",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
1121
TOOHUCardAPI/Migrations/20211107185734_cascade delete children.Designer.cs
generated
Normal file
1121
TOOHUCardAPI/Migrations/20211107185734_cascade delete children.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
public partial class cascadedeletechildren : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
table: "EncodedCardGroup");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
table: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
column: "UserSteamId",
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
column: "RankEntryId",
|
||||
principalTable: "RankEntries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
table: "EncodedCardGroup");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
table: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
type: "bigint",
|
||||
nullable: true,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
column: "UserSteamId",
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
column: "RankEntryId",
|
||||
principalTable: "RankEntries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -930,7 +930,7 @@ namespace TOOHUCardAPI.Migrations
|
||||
b.Property<string>("GroupKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long?>("UserSteamId")
|
||||
b.Property<long>("UserSteamId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -947,11 +947,8 @@ namespace TOOHUCardAPI.Migrations
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<long>("AccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("Damage")
|
||||
.HasColumnType("bigint");
|
||||
b.Property<float>("Damage")
|
||||
.HasColumnType("real");
|
||||
|
||||
b.Property<int>("RankType")
|
||||
.HasColumnType("integer");
|
||||
@@ -962,9 +959,6 @@ namespace TOOHUCardAPI.Migrations
|
||||
b.Property<long?>("UserSteamId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Version")
|
||||
.HasColumnType("text");
|
||||
|
||||
@@ -988,7 +982,7 @@ namespace TOOHUCardAPI.Migrations
|
||||
b.Property<string>("EncodedData")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int?>("RankEntryId")
|
||||
b.Property<int>("RankEntryId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("TowerKey")
|
||||
@@ -1008,6 +1002,9 @@ namespace TOOHUCardAPI.Migrations
|
||||
.HasColumnType("bigint")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<long>("AccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Ban")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
@@ -1050,6 +1047,9 @@ namespace TOOHUCardAPI.Migrations
|
||||
b.Property<int>("PowerMaxTotal")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Vip")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
@@ -1079,7 +1079,9 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.HasOne("TOOHUCardAPI.Data.Models.User", null)
|
||||
.WithMany("EncodedCardGroups")
|
||||
.HasForeignKey("UserSteamId");
|
||||
.HasForeignKey("UserSteamId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.RankEntry", b =>
|
||||
@@ -1095,7 +1097,9 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.HasOne("TOOHUCardAPI.Data.Models.RankEntry", null)
|
||||
.WithMany("TowersUsed")
|
||||
.HasForeignKey("RankEntryId");
|
||||
.HasForeignKey("RankEntryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.RankEntry", b =>
|
||||
|
||||
Reference in New Issue
Block a user