forked from SoDOff-Project/sodoff
remove all migrations
-need to add multiple contexts for development and production -remove unneeded maxlength attribute from user model
This commit is contained in:
parent
a8129eecc1
commit
4b9d7aca98
File diff suppressed because it is too large
Load Diff
@ -1,971 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class IntialCreatePostDesign : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Groups",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
GroupID = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Color = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Logo = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
ApiKey = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Groups", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RatingRanks",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
CategoryID = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
RatedEntityID = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
RatedUserID = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
Rank = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
RatingAverage = table.Column<float>(type: "REAL", nullable: false),
|
|
||||||
UpdateDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_RatingRanks", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Users",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "TEXT", nullable: false, maxLength: 255),
|
|
||||||
Email = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Username = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Password = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Users", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AchievementPoints",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Value = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_AchievementPoints", x => new { x.VikingId, x.Type });
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AchievementTaskState",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
TaskId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Points = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_AchievementTaskState", x => new { x.TaskId, x.VikingId });
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Bans",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
UserBanType = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
ExpiresOn = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Bans", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Dragons",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
EntityId = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
RaisedPetData = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
PetXP = table.Column<int>(type: "INTEGER", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Dragons", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Vikings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
Uid = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
UserId = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
AvatarSerialized = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
SelectedDragonId = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
BirthDate = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
Gender = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
GameVersion = table.Column<uint>(type: "INTEGER", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Vikings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Vikings_Dragons_SelectedDragonId",
|
|
||||||
column: x => x.SelectedDragonId,
|
|
||||||
principalTable: "Dragons",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Vikings_Users_UserId",
|
|
||||||
column: x => x.UserId,
|
|
||||||
principalTable: "Users",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GameData",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
GameId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Difficulty = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
GameLevel = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
DatePlayed = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
IsMultiplayer = table.Column<bool>(type: "INTEGER", nullable: false),
|
|
||||||
Win = table.Column<bool>(type: "INTEGER", nullable: false),
|
|
||||||
Loss = table.Column<bool>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_GameData", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GameData_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GroupViking",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
GroupsId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
VikingsId = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_GroupViking", x => new { x.GroupsId, x.VikingsId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GroupViking_Groups_GroupsId",
|
|
||||||
column: x => x.GroupsId,
|
|
||||||
principalTable: "Groups",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GroupViking_Vikings_VikingsId",
|
|
||||||
column: x => x.VikingsId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Images",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
ImageType = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
ImageSlot = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
ImageData = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
TemplateName = table.Column<string>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Images", x => new { x.ImageType, x.ImageSlot, x.VikingId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Images_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "InventoryItems",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
ItemId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
StatsSerialized = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
AttributesSerialized = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
Quantity = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_InventoryItems", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_InventoryItems_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Messages",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
ToVikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
QueueID = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
ConversationID = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
ParentMessageId = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
MessageType = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
MessageTypeID = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
MessageLevel = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Data = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
MemberMessage = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
NonMemberMessage = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
LastUpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false),
|
|
||||||
IsNew = table.Column<bool>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Messages", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Messages_Messages_ParentMessageId",
|
|
||||||
column: x => x.ParentMessageId,
|
|
||||||
principalTable: "Messages",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_ToVikingId",
|
|
||||||
column: x => x.ToVikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "MissionStates",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
MissionId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
MissionStatus = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
UserAccepted = table.Column<bool>(type: "INTEGER", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_MissionStates", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_MissionStates_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "MMORoles",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Role = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_MMORoles", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_MMORoles_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Neighborhoods",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Slot0 = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Slot1 = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Slot2 = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Slot3 = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
Slot4 = table.Column<Guid>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Neighborhoods", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Neighborhoods_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "PairData",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
PairId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
UserId = table.Column<Guid>(type: "TEXT", nullable: true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
DragonId = table.Column<int>(type: "INTEGER", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_PairData", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PairData_Dragons_DragonId",
|
|
||||||
column: x => x.DragonId,
|
|
||||||
principalTable: "Dragons",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PairData_Users_UserId",
|
|
||||||
column: x => x.UserId,
|
|
||||||
principalTable: "Users",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_PairData_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Parties",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
Location = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
ExpirationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
PrivateParty = table.Column<bool>(type: "INTEGER", nullable: true),
|
|
||||||
LocationIconAsset = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
AssetBundle = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Parties", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Parties_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ProfileAnswers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
QuestionID = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
AnswerID = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ProfileAnswers", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProfileAnswers_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Ratings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
RankId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Value = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Date = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Ratings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Ratings_RatingRanks_RankId",
|
|
||||||
column: x => x.RankId,
|
|
||||||
principalTable: "RatingRanks",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Ratings_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Rooms",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
RoomId = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Rooms", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Rooms_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "SavedData",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
SaveId = table.Column<uint>(type: "INTEGER", nullable: false),
|
|
||||||
SerializedData = table.Column<string>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SavedData", x => new { x.VikingId, x.SaveId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SavedData_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "SceneData",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
SceneName = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
XmlData = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SceneData", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SceneData_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Sessions",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
ApiToken = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
UserId = table.Column<Guid>(type: "TEXT", nullable: true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Sessions", x => x.ApiToken);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Sessions_Users_UserId",
|
|
||||||
column: x => x.UserId,
|
|
||||||
principalTable: "Users",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Sessions_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "TaskStatuses",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
MissionId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Payload = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
Completed = table.Column<bool>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_TaskStatuses", x => new { x.Id, x.VikingId, x.MissionId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TaskStatuses_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "UserBadgesCompleted",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
BadgeId = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_UserBadgesCompleted", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_UserBadgesCompleted_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "UserMissionData",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
WorldId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
MissionId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
StepId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
TaskId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
IsCompleted = table.Column<bool>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_UserMissionData", x => new { x.VikingId, x.WorldId, x.MissionId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_UserMissionData_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GameDataPairs",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
GameDataId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Value = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_GameDataPairs", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GameDataPairs_GameData_GameDataId",
|
|
||||||
column: x => x.GameDataId,
|
|
||||||
principalTable: "GameData",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Pairs",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
Key = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
Value = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
MasterId = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Pairs", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Pairs_PairData_MasterId",
|
|
||||||
column: x => x.MasterId,
|
|
||||||
principalTable: "PairData",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "RoomItems",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
RoomId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
RoomItemData = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_RoomItems", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_RoomItems_Rooms_RoomId",
|
|
||||||
column: x => x.RoomId,
|
|
||||||
principalTable: "Rooms",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AchievementTaskState_VikingId",
|
|
||||||
table: "AchievementTaskState",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Bans_VikingId",
|
|
||||||
table: "Bans",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Dragons_VikingId",
|
|
||||||
table: "Dragons",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_GameData_VikingId",
|
|
||||||
table: "GameData",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_GameDataPairs_GameDataId",
|
|
||||||
table: "GameDataPairs",
|
|
||||||
column: "GameDataId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_GroupViking_VikingsId",
|
|
||||||
table: "GroupViking",
|
|
||||||
column: "VikingsId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Images_VikingId",
|
|
||||||
table: "Images",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_InventoryItems_VikingId",
|
|
||||||
table: "InventoryItems",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Messages_ParentMessageId",
|
|
||||||
table: "Messages",
|
|
||||||
column: "ParentMessageId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Messages_ToVikingId",
|
|
||||||
table: "Messages",
|
|
||||||
column: "ToVikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Messages_VikingId",
|
|
||||||
table: "Messages",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_MissionStates_VikingId",
|
|
||||||
table: "MissionStates",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_MMORoles_VikingId",
|
|
||||||
table: "MMORoles",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Neighborhoods_VikingId",
|
|
||||||
table: "Neighborhoods",
|
|
||||||
column: "VikingId",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PairData_DragonId",
|
|
||||||
table: "PairData",
|
|
||||||
column: "DragonId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PairData_UserId",
|
|
||||||
table: "PairData",
|
|
||||||
column: "UserId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_PairData_VikingId",
|
|
||||||
table: "PairData",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Pairs_MasterId",
|
|
||||||
table: "Pairs",
|
|
||||||
column: "MasterId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Parties_VikingId",
|
|
||||||
table: "Parties",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProfileAnswers_VikingId",
|
|
||||||
table: "ProfileAnswers",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Ratings_RankId",
|
|
||||||
table: "Ratings",
|
|
||||||
column: "RankId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Ratings_VikingId",
|
|
||||||
table: "Ratings",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_RoomItems_RoomId",
|
|
||||||
table: "RoomItems",
|
|
||||||
column: "RoomId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Rooms_VikingId",
|
|
||||||
table: "Rooms",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SceneData_VikingId",
|
|
||||||
table: "SceneData",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Sessions_UserId",
|
|
||||||
table: "Sessions",
|
|
||||||
column: "UserId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Sessions_VikingId",
|
|
||||||
table: "Sessions",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TaskStatuses_VikingId",
|
|
||||||
table: "TaskStatuses",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_UserBadgesCompleted_VikingId",
|
|
||||||
table: "UserBadgesCompleted",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Vikings_SelectedDragonId",
|
|
||||||
table: "Vikings",
|
|
||||||
column: "SelectedDragonId",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Vikings_Uid",
|
|
||||||
table: "Vikings",
|
|
||||||
column: "Uid");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Vikings_UserId",
|
|
||||||
table: "Vikings",
|
|
||||||
column: "UserId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_AchievementPoints_Vikings_VikingId",
|
|
||||||
table: "AchievementPoints",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_AchievementTaskState_Vikings_VikingId",
|
|
||||||
table: "AchievementTaskState",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Bans_Vikings_VikingId",
|
|
||||||
table: "Bans",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Dragons_Vikings_VikingId",
|
|
||||||
table: "Dragons",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Dragons_Vikings_VikingId",
|
|
||||||
table: "Dragons");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AchievementPoints");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AchievementTaskState");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Bans");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GameDataPairs");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GroupViking");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Images");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "InventoryItems");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Messages");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "MissionStates");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "MMORoles");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Neighborhoods");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Pairs");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Parties");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ProfileAnswers");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Ratings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RoomItems");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "SavedData");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "SceneData");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Sessions");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "TaskStatuses");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "UserBadgesCompleted");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "UserMissionData");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GameData");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Groups");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "PairData");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "RatingRanks");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Rooms");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Vikings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Dragons");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Users");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1307
src/Migrations/20250303203411_Buddies.Designer.cs
generated
1307
src/Migrations/20250303203411_Buddies.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Buddies : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Buddy",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
VikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
BuddyVikingId = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
BuddyStatus1 = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
BuddyStatus2 = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
IsBestFriend1 = table.Column<bool>(type: "INTEGER", nullable: false),
|
|
||||||
IsBestFriend2 = table.Column<bool>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Buddy", x => x.VikingId);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_BuddyVikingId",
|
|
||||||
column: x => x.BuddyVikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_VikingId",
|
|
||||||
column: x => x.VikingId,
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Buddy_BuddyVikingId",
|
|
||||||
table: "Buddy",
|
|
||||||
column: "BuddyVikingId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Buddy");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1307
src/Migrations/20250303204009_Buddies_DBSetFix.Designer.cs
generated
1307
src/Migrations/20250303204009_Buddies_DBSetFix.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Buddies_DBSetFix : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1310
src/Migrations/20250303212804_Buddies_CreateDate.Designer.cs
generated
1310
src/Migrations/20250303212804_Buddies_CreateDate.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,114 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Buddies_CreateDate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_BuddyVikingId",
|
|
||||||
table: "Buddy");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_VikingId",
|
|
||||||
table: "Buddy");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Buddy",
|
|
||||||
table: "Buddy");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "Buddy",
|
|
||||||
newName: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Buddy_BuddyVikingId",
|
|
||||||
table: "Buddies",
|
|
||||||
newName: "IX_Buddies_BuddyVikingId");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "CreatedAt",
|
|
||||||
table: "Buddies",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Buddies_Vikings_BuddyVikingId",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "BuddyVikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Buddies_Vikings_VikingId",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Buddies_Vikings_BuddyVikingId",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Buddies_Vikings_VikingId",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CreatedAt",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.RenameTable(
|
|
||||||
name: "Buddies",
|
|
||||||
newName: "Buddy");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Buddies_BuddyVikingId",
|
|
||||||
table: "Buddy",
|
|
||||||
newName: "IX_Buddy_BuddyVikingId");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Buddy",
|
|
||||||
table: "Buddy",
|
|
||||||
column: "VikingId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_BuddyVikingId",
|
|
||||||
table: "Buddy",
|
|
||||||
column: "BuddyVikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Buddy_Vikings_VikingId",
|
|
||||||
table: "Buddy",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1316
src/Migrations/20250306190354_Buddies_Id.Designer.cs
generated
1316
src/Migrations/20250306190354_Buddies_Id.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Buddies_Id : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "Id",
|
|
||||||
table: "Buddies",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true);
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Buddies_VikingId",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "VikingId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Buddies_VikingId",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Id",
|
|
||||||
table: "Buddies");
|
|
||||||
|
|
||||||
migrationBuilder.AddPrimaryKey(
|
|
||||||
name: "PK_Buddies",
|
|
||||||
table: "Buddies",
|
|
||||||
column: "VikingId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Messaging_IsPrivate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsPrivate",
|
|
||||||
table: "Messages",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsPrivate",
|
|
||||||
table: "Messages");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,59 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Messaging_VikingIdOptional : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_VikingId",
|
|
||||||
table: "Messages");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "VikingId",
|
|
||||||
table: "Messages",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "INTEGER");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_VikingId",
|
|
||||||
table: "Messages",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_VikingId",
|
|
||||||
table: "Messages");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "VikingId",
|
|
||||||
table: "Messages",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "INTEGER",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Messages_Vikings_VikingId",
|
|
||||||
table: "Messages",
|
|
||||||
column: "VikingId",
|
|
||||||
principalTable: "Vikings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1320
src/Migrations/20250308012001_Viking_BuddyCode.Designer.cs
generated
1320
src/Migrations/20250308012001_Viking_BuddyCode.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Viking_BuddyCode : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "BuddyCode",
|
|
||||||
table: "Vikings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "BuddyCode",
|
|
||||||
table: "Vikings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1323
src/Migrations/20250308013623_Viking_Online.Designer.cs
generated
1323
src/Migrations/20250308013623_Viking_Online.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Viking_Online : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "Online",
|
|
||||||
table: "Vikings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "Online",
|
|
||||||
table: "Vikings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Viking_CurrentRoomId : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "CurrentRoomId",
|
|
||||||
table: "Vikings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CurrentRoomId",
|
|
||||||
table: "Vikings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1329
src/Migrations/20250318223639_Viking_CurrentZone.Designer.cs
generated
1329
src/Migrations/20250318223639_Viking_CurrentZone.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace sodoff.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Viking_CurrentZone : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "CurrentZone",
|
|
||||||
table: "Vikings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CurrentZone",
|
|
||||||
table: "Vikings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,6 @@
|
|||||||
namespace sodoff.Model;
|
namespace sodoff.Model;
|
||||||
public class User {
|
public class User {
|
||||||
[Key]
|
[Key]
|
||||||
[MaxLength(255)]
|
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user