Pushed up to docker
This commit is contained in:
@@ -13,7 +13,7 @@ namespace TOOHUCardAPI.Controllers
|
||||
{
|
||||
public class MethodBasedController<TChildType> : ControllerBase
|
||||
{
|
||||
public delegate Task<IActionResult> EndpointHandler(string requestBody);
|
||||
private delegate Task<IActionResult> EndpointHandler(string requestBody);
|
||||
|
||||
/**
|
||||
* The game uses a single endpoint for player data.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
@@ -1,753 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
public partial class resettingmigrationscuzimesseduphaha : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Users",
|
||||
columns: table => new
|
||||
{
|
||||
SteamId = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
MaxWave = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MaxTeamWave = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PetLevel = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
EndTime = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
KeyTotal = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
KeyUseCount = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
KeySaveDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Vip = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Ban = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Point = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
LastFirstWin = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
LastDailyLoginBonus = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
PowerMaxTotal = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
PetModel = table.Column<string>(type: "TEXT", nullable: true),
|
||||
PetEffect = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Users", x => x.SteamId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EncodedCardGroup",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GroupKey = table.Column<string>(type: "TEXT", nullable: true),
|
||||
EncodedString = table.Column<string>(type: "TEXT", nullable: true),
|
||||
UserSteamId = table.Column<long>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EncodedCardGroup", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RankEntries",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
RankType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
UserSteamId = table.Column<long>(type: "INTEGER", nullable: true),
|
||||
Version = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Wave = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Damage = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RankEntries", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RankEntries_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CardLevel",
|
||||
columns: table => new
|
||||
{
|
||||
UserSteamId = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
CardItemCode = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Level = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CardLevel", x => new { x.UserSteamId, x.CardItemCode });
|
||||
table.ForeignKey(
|
||||
name: "FK_CardLevel_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RankTowerEntry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
BaseUnitItemCode = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Star = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Damage = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Attack = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Power = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
RankEntryId = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RankTowerEntry", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
column: x => x.RankEntryId,
|
||||
principalTable: "RankEntries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Cards",
|
||||
columns: table => new
|
||||
{
|
||||
ItemCode = table.Column<string>(type: "TEXT", nullable: false),
|
||||
CardName = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Quality = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
HasVoice = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
HasPortrait = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
RankTowerEntryId = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Cards", x => x.ItemCode);
|
||||
table.ForeignKey(
|
||||
name: "FK_Cards_RankTowerEntry_RankTowerEntryId",
|
||||
column: x => x.RankTowerEntryId,
|
||||
principalTable: "RankTowerEntry",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0026", "rin", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0017", "iku", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0092", "medicine", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0064", "shikieiki", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1006", "BonusEgg", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0005", "shanghainingyou", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0093", "kyouko", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0024", "yuyuko", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2013", "item_2013", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0058", "luna", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0047", "kanako", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0068", "komachi", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0027", "utsuho", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0097", "yoshika", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1013", "BonusEgg", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2001", "item_2001", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0095", "futo", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0057", "sunny", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0006", "hourainingyou", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0056", "star", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2003", "item_2003", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2004", "item_2004", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0049", "minamitsu", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0023", "reisen", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0013", "lunasa", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0052", "miko", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0091", "hina", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0040", "mokou", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0021", "patchouli", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0094", "soga", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0031", "koishi", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0012", "lyrica", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0008", "maidyousei", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0053", "kokoro", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0016", "satori", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0048", "suwako", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0035", "yuuka", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0037", "ran", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0039", "eirin", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0041", "kaguya", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0033", "koakuma", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0032", "flandre", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0054", "yuugi", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0059", "alice", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0060", "wriggle", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1005", "BonusEgg", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0001", "lily", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0062", "inaba", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0010", "kogasa", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2012", "item_2012", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0088", "sizuha", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1004", "BonusEgg", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0020", "tenshi", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2005", "item_2005", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0046", "sanae", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2022", "item_2022", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0003", "minoriko", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0022", "sakuya", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1003", "BonusEgg", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0011", "letty", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0044", "momiji", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0050", "nue", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0075", "clownpiece", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0019", "marisa", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0045", "kagerou", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0028", "reimu", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0030", "remilia", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0015", "rumia", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1011", "BonusEgg", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0042", "aya", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0069", "toramaru", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0061", "keine", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0002", "nazrin", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0055", "suika", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2002", "item_2002", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0007", "hanadayousei", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0014", "merlin", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0043", "hatate", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2020", "item_2020", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2017", "item_2017", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2016", "item_2016", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2006", "item_2006", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2009", "item_2009", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0018", "mystia", true, true, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0036", "yukari", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2008", "item_2008", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2010", "item_2010", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2011", "item_2011", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0034", "meirin", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0096", "seiga", true, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0004", "mugiyousei", false, false, 1, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0025", "youmu", true, true, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2007", "item_2007", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0063", "kisume", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0073", "junko", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0029", "daiyousei", true, true, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1012", "BonusEgg", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0051", "byakuren", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0080", "shinki", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0074", "hecatia", true, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0038", "chen", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_0009", "cirno", true, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2014", "item_2014", false, false, 4, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2015", "item_2015", false, false, 3, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2019", "item_2019", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_2018", "item_2018", false, false, 2, null });
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[] { "item_1014", "BonusEgg", false, false, 4, null });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CardLevel_CardItemCode",
|
||||
table: "CardLevel",
|
||||
column: "CardItemCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Cards_RankTowerEntryId",
|
||||
table: "Cards",
|
||||
column: "RankTowerEntryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EncodedCardGroup_UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
column: "UserSteamId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankEntries_UserSteamId",
|
||||
table: "RankEntries",
|
||||
column: "UserSteamId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankTowerEntry_BaseUnitItemCode",
|
||||
table: "RankTowerEntry",
|
||||
column: "BaseUnitItemCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankTowerEntry_RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
column: "RankEntryId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CardLevel_Cards_CardItemCode",
|
||||
table: "CardLevel",
|
||||
column: "CardItemCode",
|
||||
principalTable: "Cards",
|
||||
principalColumn: "ItemCode",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RankTowerEntry_Cards_BaseUnitItemCode",
|
||||
table: "RankTowerEntry",
|
||||
column: "BaseUnitItemCode",
|
||||
principalTable: "Cards",
|
||||
principalColumn: "ItemCode",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RankTowerEntry_Cards_BaseUnitItemCode",
|
||||
table: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CardLevel");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EncodedCardGroup");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Cards");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RankEntries");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,39 +4,42 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TOOHUCardAPI.Data;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
[Migration("20211101040807_resetting migrations cuz i messed up haha")]
|
||||
partial class resettingmigrationscuzimesseduphaha
|
||||
[Migration("20211102011654_moving to postgres")]
|
||||
partial class movingtopostgres
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.11");
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "5.0.11")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.Card", b =>
|
||||
{
|
||||
b.Property<string>("ItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("CardName")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("HasPortrait")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasVoice")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("Quality")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RankTowerEntryId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("ItemCode");
|
||||
|
||||
@@ -906,13 +909,13 @@ namespace TOOHUCardAPI.Migrations
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.CardLevel", b =>
|
||||
{
|
||||
b.Property<long>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("CardItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UserSteamId", "CardItemCode");
|
||||
|
||||
@@ -925,16 +928,17 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("EncodedString")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("GroupKey")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long?>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -947,22 +951,23 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<long>("Damage")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("RankType")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<long?>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Version")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Wave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -975,25 +980,26 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("Attack")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("BaseUnitItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Power")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RankEntryId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Star")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -1008,52 +1014,53 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<long>("SteamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<bool>("Ban")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("EndTime")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<DateTime>("KeySaveDate")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int>("KeyTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("KeyUseCount")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("LastDailyLoginBonus")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<DateTime>("LastFirstWin")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int>("MaxTeamWave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaxWave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("PetEffect")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("PetLevel")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("PetModel")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Point")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PowerMaxTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("Vip")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("SteamId");
|
||||
|
||||
333
TOOHUCardAPI/Migrations/20211102011654_moving to postgres.cs
Normal file
333
TOOHUCardAPI/Migrations/20211102011654_moving to postgres.cs
Normal file
@@ -0,0 +1,333 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
public partial class movingtopostgres : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Users",
|
||||
columns: table => new
|
||||
{
|
||||
SteamId = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
MaxWave = table.Column<int>(type: "integer", nullable: false),
|
||||
MaxTeamWave = table.Column<int>(type: "integer", nullable: false),
|
||||
PetLevel = table.Column<int>(type: "integer", nullable: false),
|
||||
EndTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
KeyTotal = table.Column<int>(type: "integer", nullable: false),
|
||||
KeyUseCount = table.Column<int>(type: "integer", nullable: false),
|
||||
KeySaveDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
Vip = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Ban = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Point = table.Column<int>(type: "integer", nullable: false),
|
||||
LastFirstWin = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
LastDailyLoginBonus = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
||||
PowerMaxTotal = table.Column<int>(type: "integer", nullable: false),
|
||||
PetModel = table.Column<string>(type: "text", nullable: true),
|
||||
PetEffect = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Users", x => x.SteamId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EncodedCardGroup",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
GroupKey = table.Column<string>(type: "text", nullable: true),
|
||||
EncodedString = table.Column<string>(type: "text", nullable: true),
|
||||
UserSteamId = table.Column<long>(type: "bigint", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EncodedCardGroup", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EncodedCardGroup_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RankEntries",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
RankType = table.Column<int>(type: "integer", nullable: false),
|
||||
UserSteamId = table.Column<long>(type: "bigint", nullable: true),
|
||||
Version = table.Column<string>(type: "text", nullable: true),
|
||||
Wave = table.Column<int>(type: "integer", nullable: false),
|
||||
Damage = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RankEntries", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RankEntries_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CardLevel",
|
||||
columns: table => new
|
||||
{
|
||||
UserSteamId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CardItemCode = table.Column<string>(type: "text", nullable: false),
|
||||
Level = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CardLevel", x => new { x.UserSteamId, x.CardItemCode });
|
||||
table.ForeignKey(
|
||||
name: "FK_CardLevel_Users_UserSteamId",
|
||||
column: x => x.UserSteamId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "SteamId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RankTowerEntry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
BaseUnitItemCode = table.Column<string>(type: "text", nullable: true),
|
||||
Star = table.Column<int>(type: "integer", nullable: false),
|
||||
Damage = table.Column<int>(type: "integer", nullable: false),
|
||||
Attack = table.Column<int>(type: "integer", nullable: false),
|
||||
Power = table.Column<int>(type: "integer", nullable: false),
|
||||
RankEntryId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RankTowerEntry", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RankTowerEntry_RankEntries_RankEntryId",
|
||||
column: x => x.RankEntryId,
|
||||
principalTable: "RankEntries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Cards",
|
||||
columns: table => new
|
||||
{
|
||||
ItemCode = table.Column<string>(type: "text", nullable: false),
|
||||
CardName = table.Column<string>(type: "text", nullable: true),
|
||||
Quality = table.Column<int>(type: "integer", nullable: false),
|
||||
HasVoice = table.Column<bool>(type: "boolean", nullable: false),
|
||||
HasPortrait = table.Column<bool>(type: "boolean", nullable: false),
|
||||
RankTowerEntryId = table.Column<int>(type: "integer", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Cards", x => x.ItemCode);
|
||||
table.ForeignKey(
|
||||
name: "FK_Cards_RankTowerEntry_RankTowerEntryId",
|
||||
column: x => x.RankTowerEntryId,
|
||||
principalTable: "RankTowerEntry",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "Cards",
|
||||
columns: new[] { "ItemCode", "CardName", "HasPortrait", "HasVoice", "Quality", "RankTowerEntryId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "item_0026", "rin", true, true, 3, null },
|
||||
{ "item_0017", "iku", true, false, 2, null },
|
||||
{ "item_0092", "medicine", true, true, 2, null },
|
||||
{ "item_0064", "shikieiki", true, false, 4, null },
|
||||
{ "item_1006", "BonusEgg", false, false, 4, null },
|
||||
{ "item_0005", "shanghainingyou", false, false, 1, null },
|
||||
{ "item_0093", "kyouko", true, true, 2, null },
|
||||
{ "item_0024", "yuyuko", true, true, 3, null },
|
||||
{ "item_2013", "item_2013", false, false, 4, null },
|
||||
{ "item_0058", "luna", true, true, 2, null },
|
||||
{ "item_0047", "kanako", true, true, 4, null },
|
||||
{ "item_0068", "komachi", true, false, 4, null },
|
||||
{ "item_0027", "utsuho", true, false, 3, null },
|
||||
{ "item_0097", "yoshika", true, false, 2, null },
|
||||
{ "item_1013", "BonusEgg", false, false, 3, null },
|
||||
{ "item_2001", "item_2001", false, false, 3, null },
|
||||
{ "item_0095", "futo", true, false, 3, null },
|
||||
{ "item_0057", "sunny", true, true, 2, null },
|
||||
{ "item_0006", "hourainingyou", false, false, 1, null },
|
||||
{ "item_0056", "star", true, true, 2, null },
|
||||
{ "item_2003", "item_2003", false, false, 3, null },
|
||||
{ "item_2004", "item_2004", false, false, 2, null },
|
||||
{ "item_0049", "minamitsu", true, true, 3, null },
|
||||
{ "item_0023", "reisen", true, true, 3, null },
|
||||
{ "item_0013", "lunasa", true, true, 2, null },
|
||||
{ "item_0052", "miko", true, true, 4, null },
|
||||
{ "item_0091", "hina", true, false, 2, null },
|
||||
{ "item_0040", "mokou", true, true, 3, null },
|
||||
{ "item_0021", "patchouli", true, true, 3, null },
|
||||
{ "item_0094", "soga", true, true, 3, null },
|
||||
{ "item_0031", "koishi", true, true, 4, null },
|
||||
{ "item_0012", "lyrica", true, true, 2, null },
|
||||
{ "item_0008", "maidyousei", false, false, 1, null },
|
||||
{ "item_0053", "kokoro", true, true, 3, null },
|
||||
{ "item_0016", "satori", true, true, 2, null },
|
||||
{ "item_0048", "suwako", true, false, 3, null },
|
||||
{ "item_0035", "yuuka", true, true, 4, null },
|
||||
{ "item_0037", "ran", true, true, 3, null },
|
||||
{ "item_0039", "eirin", true, true, 4, null },
|
||||
{ "item_0041", "kaguya", true, true, 3, null },
|
||||
{ "item_0033", "koakuma", true, true, 2, null },
|
||||
{ "item_0032", "flandre", true, true, 4, null },
|
||||
{ "item_0054", "yuugi", true, true, 3, null },
|
||||
{ "item_0059", "alice", true, true, 3, null },
|
||||
{ "item_0060", "wriggle", true, false, 2, null },
|
||||
{ "item_1005", "BonusEgg", false, false, 3, null },
|
||||
{ "item_0001", "lily", true, false, 2, null },
|
||||
{ "item_0062", "inaba", true, false, 2, null },
|
||||
{ "item_0010", "kogasa", true, true, 2, null },
|
||||
{ "item_2012", "item_2012", false, false, 4, null },
|
||||
{ "item_0088", "sizuha", true, true, 2, null },
|
||||
{ "item_1004", "BonusEgg", false, false, 2, null },
|
||||
{ "item_0020", "tenshi", true, false, 3, null },
|
||||
{ "item_2005", "item_2005", false, false, 2, null },
|
||||
{ "item_0046", "sanae", true, false, 3, null },
|
||||
{ "item_2022", "item_2022", false, false, 3, null },
|
||||
{ "item_0003", "minoriko", true, true, 2, null },
|
||||
{ "item_0022", "sakuya", true, true, 3, null },
|
||||
{ "item_1003", "BonusEgg", false, false, 1, null },
|
||||
{ "item_0011", "letty", true, true, 2, null },
|
||||
{ "item_0044", "momiji", true, true, 2, null },
|
||||
{ "item_0050", "nue", true, false, 3, null },
|
||||
{ "item_0075", "clownpiece", true, false, 3, null },
|
||||
{ "item_0019", "marisa", true, true, 3, null },
|
||||
{ "item_0045", "kagerou", true, false, 3, null },
|
||||
{ "item_0028", "reimu", true, true, 4, null },
|
||||
{ "item_0030", "remilia", true, false, 4, null },
|
||||
{ "item_0015", "rumia", true, true, 2, null },
|
||||
{ "item_1011", "BonusEgg", false, false, 1, null },
|
||||
{ "item_0042", "aya", true, false, 3, null },
|
||||
{ "item_0069", "toramaru", true, false, 2, null },
|
||||
{ "item_0061", "keine", true, false, 3, null },
|
||||
{ "item_0002", "nazrin", true, true, 2, null },
|
||||
{ "item_0055", "suika", true, true, 3, null },
|
||||
{ "item_2002", "item_2002", false, false, 4, null },
|
||||
{ "item_0007", "hanadayousei", false, false, 1, null },
|
||||
{ "item_0014", "merlin", true, true, 2, null },
|
||||
{ "item_0043", "hatate", true, true, 2, null },
|
||||
{ "item_2020", "item_2020", false, false, 4, null },
|
||||
{ "item_2017", "item_2017", false, false, 3, null },
|
||||
{ "item_2016", "item_2016", false, false, 3, null },
|
||||
{ "item_2006", "item_2006", false, false, 2, null },
|
||||
{ "item_2009", "item_2009", false, false, 3, null },
|
||||
{ "item_0018", "mystia", true, true, 2, null },
|
||||
{ "item_0036", "yukari", true, false, 4, null },
|
||||
{ "item_2008", "item_2008", false, false, 2, null },
|
||||
{ "item_2010", "item_2010", false, false, 3, null },
|
||||
{ "item_2011", "item_2011", false, false, 3, null },
|
||||
{ "item_0034", "meirin", true, false, 2, null },
|
||||
{ "item_0096", "seiga", true, false, 3, null },
|
||||
{ "item_0004", "mugiyousei", false, false, 1, null },
|
||||
{ "item_0025", "youmu", true, true, 3, null },
|
||||
{ "item_2007", "item_2007", false, false, 2, null },
|
||||
{ "item_0063", "kisume", true, false, 2, null },
|
||||
{ "item_0073", "junko", true, false, 4, null },
|
||||
{ "item_0029", "daiyousei", true, true, 4, null },
|
||||
{ "item_1012", "BonusEgg", false, false, 2, null },
|
||||
{ "item_0051", "byakuren", true, false, 4, null },
|
||||
{ "item_0080", "shinki", true, false, 4, null },
|
||||
{ "item_0074", "hecatia", true, false, 4, null },
|
||||
{ "item_0038", "chen", true, false, 2, null },
|
||||
{ "item_0009", "cirno", true, false, 2, null },
|
||||
{ "item_2014", "item_2014", false, false, 4, null },
|
||||
{ "item_2015", "item_2015", false, false, 3, null },
|
||||
{ "item_2019", "item_2019", false, false, 2, null },
|
||||
{ "item_2018", "item_2018", false, false, 2, null },
|
||||
{ "item_1014", "BonusEgg", false, false, 4, null }
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CardLevel_CardItemCode",
|
||||
table: "CardLevel",
|
||||
column: "CardItemCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Cards_RankTowerEntryId",
|
||||
table: "Cards",
|
||||
column: "RankTowerEntryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EncodedCardGroup_UserSteamId",
|
||||
table: "EncodedCardGroup",
|
||||
column: "UserSteamId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankEntries_UserSteamId",
|
||||
table: "RankEntries",
|
||||
column: "UserSteamId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankTowerEntry_BaseUnitItemCode",
|
||||
table: "RankTowerEntry",
|
||||
column: "BaseUnitItemCode");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RankTowerEntry_RankEntryId",
|
||||
table: "RankTowerEntry",
|
||||
column: "RankEntryId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_CardLevel_Cards_CardItemCode",
|
||||
table: "CardLevel",
|
||||
column: "CardItemCode",
|
||||
principalTable: "Cards",
|
||||
principalColumn: "ItemCode",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_RankTowerEntry_Cards_BaseUnitItemCode",
|
||||
table: "RankTowerEntry",
|
||||
column: "BaseUnitItemCode",
|
||||
principalTable: "Cards",
|
||||
principalColumn: "ItemCode",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_RankTowerEntry_Cards_BaseUnitItemCode",
|
||||
table: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CardLevel");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EncodedCardGroup");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Cards");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RankTowerEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RankEntries");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TOOHUCardAPI.Data;
|
||||
|
||||
namespace TOOHUCardAPI.Migrations
|
||||
@@ -14,27 +15,29 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.11");
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63)
|
||||
.HasAnnotation("ProductVersion", "5.0.11")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.Card", b =>
|
||||
{
|
||||
b.Property<string>("ItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("CardName")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("HasPortrait")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("HasVoice")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("Quality")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RankTowerEntryId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("ItemCode");
|
||||
|
||||
@@ -904,13 +907,13 @@ namespace TOOHUCardAPI.Migrations
|
||||
modelBuilder.Entity("TOOHUCardAPI.Data.Models.CardLevel", b =>
|
||||
{
|
||||
b.Property<long>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("CardItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UserSteamId", "CardItemCode");
|
||||
|
||||
@@ -923,16 +926,17 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<string>("EncodedString")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("GroupKey")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long?>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -945,22 +949,23 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<long>("Damage")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("RankType")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<long?>("UserSteamId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Version")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Wave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -973,25 +978,26 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<int>("Attack")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("BaseUnitItemCode")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Power")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("RankEntryId")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Star")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
@@ -1006,52 +1012,53 @@ namespace TOOHUCardAPI.Migrations
|
||||
{
|
||||
b.Property<long>("SteamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("bigint")
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
|
||||
b.Property<bool>("Ban")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("EndTime")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<DateTime>("KeySaveDate")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int>("KeyTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("KeyUseCount")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTime>("LastDailyLoginBonus")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<DateTime>("LastFirstWin")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("timestamp without time zone");
|
||||
|
||||
b.Property<int>("MaxTeamWave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("MaxWave")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("PetEffect")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("PetLevel")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("PetModel")
|
||||
.HasColumnType("TEXT");
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Point")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("PowerMaxTotal")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("Vip")
|
||||
.HasColumnType("INTEGER");
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.HasKey("SteamId");
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace TOOHUCardAPI
|
||||
services.AddControllers().AddNewtonsoftJson();
|
||||
services.AddDbContext<AppDbContext>(opt =>
|
||||
{
|
||||
opt.UseSqlite(Configuration.GetConnectionString("Sqlite"));
|
||||
opt.UseNpgsql(Configuration.GetConnectionString("postgres"));
|
||||
});
|
||||
services.AddScoped<UserRepository>();
|
||||
services.AddScoped<StoreService>();
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<PackageReference Include="NLog" Version="4.7.12" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.4" />
|
||||
<PackageReference Include="NLog.Schema" Version="4.7.12" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.10" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
12
TOOHUCardAPI/appsettings.Production.json
Normal file
12
TOOHUCardAPI/appsettings.Production.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"postgres": "host=2huapidb;database=2huapi;user id=2huapi;password=2huapi;"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"Sqlite": "Data Source=test.db"
|
||||
"Sqlite": "Data Source=test.db",
|
||||
"postgres": "host=192.168.3.4;database=2huapi;user id=2huapi;password=2huapi;"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
||||
Reference in New Issue
Block a user