|
|
|
@ -146,25 +146,6 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
table.PrimaryKey("PK_TvRequests", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "OldUsers",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Alias = table.Column<string>(nullable: true),
|
|
|
|
|
ClaimsSerialized = table.Column<string>(nullable: true),
|
|
|
|
|
EmailAddress = table.Column<string>(nullable: true),
|
|
|
|
|
Password = table.Column<string>(nullable: true),
|
|
|
|
|
Salt = table.Column<byte[]>(nullable: true),
|
|
|
|
|
UserType = table.Column<int>(nullable: false),
|
|
|
|
|
Username = table.Column<string>(nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_OldUsers", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "AspNetRoleClaims",
|
|
|
|
|
columns: table => new
|
|
|
|
@ -252,46 +233,56 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "PlexSeasonsContent",
|
|
|
|
|
name: "MovieRequests",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
ParentKey = table.Column<int>(nullable: false),
|
|
|
|
|
PlexContentId = table.Column<int>(nullable: false),
|
|
|
|
|
SeasonKey = table.Column<int>(nullable: false),
|
|
|
|
|
SeasonNumber = table.Column<int>(nullable: false)
|
|
|
|
|
Approved = table.Column<bool>(nullable: false),
|
|
|
|
|
Available = table.Column<bool>(nullable: false),
|
|
|
|
|
Denied = table.Column<bool>(nullable: true),
|
|
|
|
|
DeniedReason = table.Column<string>(nullable: true),
|
|
|
|
|
ImdbId = table.Column<string>(nullable: true),
|
|
|
|
|
IssueId = table.Column<int>(nullable: true),
|
|
|
|
|
Overview = table.Column<string>(nullable: true),
|
|
|
|
|
PosterPath = table.Column<string>(nullable: true),
|
|
|
|
|
ReleaseDate = table.Column<DateTime>(nullable: false),
|
|
|
|
|
RequestType = table.Column<int>(nullable: false),
|
|
|
|
|
RequestedDate = table.Column<DateTime>(nullable: false),
|
|
|
|
|
RequestedUserId = table.Column<string>(nullable: true),
|
|
|
|
|
Status = table.Column<string>(nullable: true),
|
|
|
|
|
TheMovieDbId = table.Column<int>(nullable: false),
|
|
|
|
|
Title = table.Column<string>(nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_PlexSeasonsContent", x => x.Id);
|
|
|
|
|
table.PrimaryKey("PK_MovieRequests", x => x.Id);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_PlexSeasonsContent_PlexContent_PlexContentId",
|
|
|
|
|
column: x => x.PlexContentId,
|
|
|
|
|
principalTable: "PlexContent",
|
|
|
|
|
name: "FK_MovieRequests_AspNetUsers_RequestedUserId",
|
|
|
|
|
column: x => x.RequestedUserId,
|
|
|
|
|
principalTable: "AspNetUsers",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "EmailTokens",
|
|
|
|
|
name: "PlexSeasonsContent",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
DateUsed = table.Column<DateTime>(nullable: false),
|
|
|
|
|
Token = table.Column<Guid>(nullable: false),
|
|
|
|
|
Used = table.Column<bool>(nullable: false),
|
|
|
|
|
UserId = table.Column<int>(nullable: false),
|
|
|
|
|
ValidUntil = table.Column<DateTime>(nullable: false)
|
|
|
|
|
ParentKey = table.Column<int>(nullable: false),
|
|
|
|
|
PlexContentId = table.Column<int>(nullable: false),
|
|
|
|
|
SeasonKey = table.Column<int>(nullable: false),
|
|
|
|
|
SeasonNumber = table.Column<int>(nullable: false)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_EmailTokens", x => x.Id);
|
|
|
|
|
table.PrimaryKey("PK_PlexSeasonsContent", x => x.Id);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_EmailTokens_OldUsers_UserId",
|
|
|
|
|
column: x => x.UserId,
|
|
|
|
|
principalTable: "OldUsers",
|
|
|
|
|
name: "FK_PlexSeasonsContent_PlexContent_PlexContentId",
|
|
|
|
|
column: x => x.PlexContentId,
|
|
|
|
|
principalTable: "PlexContent",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
});
|
|
|
|
@ -310,7 +301,7 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
ParentRequestId = table.Column<int>(nullable: false),
|
|
|
|
|
RequestType = table.Column<int>(nullable: false),
|
|
|
|
|
RequestedDate = table.Column<DateTime>(nullable: false),
|
|
|
|
|
RequestedUserId = table.Column<int>(nullable: false),
|
|
|
|
|
RequestedUserId = table.Column<string>(nullable: true),
|
|
|
|
|
Title = table.Column<string>(nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
@ -323,42 +314,37 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_ChildRequests_OldUsers_RequestedUserId",
|
|
|
|
|
name: "FK_ChildRequests_AspNetUsers_RequestedUserId",
|
|
|
|
|
column: x => x.RequestedUserId,
|
|
|
|
|
principalTable: "OldUsers",
|
|
|
|
|
principalTable: "AspNetUsers",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "MovieRequests",
|
|
|
|
|
name: "MovieIssues",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Approved = table.Column<bool>(nullable: false),
|
|
|
|
|
Available = table.Column<bool>(nullable: false),
|
|
|
|
|
Denied = table.Column<bool>(nullable: true),
|
|
|
|
|
DeniedReason = table.Column<string>(nullable: true),
|
|
|
|
|
ImdbId = table.Column<string>(nullable: true),
|
|
|
|
|
Description = table.Column<string>(nullable: true),
|
|
|
|
|
IssueId = table.Column<int>(nullable: true),
|
|
|
|
|
Overview = table.Column<string>(nullable: true),
|
|
|
|
|
PosterPath = table.Column<string>(nullable: true),
|
|
|
|
|
ReleaseDate = table.Column<DateTime>(nullable: false),
|
|
|
|
|
RequestType = table.Column<int>(nullable: false),
|
|
|
|
|
RequestedDate = table.Column<DateTime>(nullable: false),
|
|
|
|
|
RequestedUserId = table.Column<int>(nullable: false),
|
|
|
|
|
Status = table.Column<string>(nullable: true),
|
|
|
|
|
TheMovieDbId = table.Column<int>(nullable: false),
|
|
|
|
|
Title = table.Column<string>(nullable: true)
|
|
|
|
|
MovieId = table.Column<int>(nullable: false),
|
|
|
|
|
Subect = table.Column<string>(nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_MovieRequests", x => x.Id);
|
|
|
|
|
table.PrimaryKey("PK_MovieIssues", x => x.Id);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_MovieRequests_OldUsers_RequestedUserId",
|
|
|
|
|
column: x => x.RequestedUserId,
|
|
|
|
|
principalTable: "OldUsers",
|
|
|
|
|
name: "FK_MovieIssues_MovieRequests_IssueId",
|
|
|
|
|
column: x => x.IssueId,
|
|
|
|
|
principalTable: "MovieRequests",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_MovieIssues_MovieRequests_MovieId",
|
|
|
|
|
column: x => x.MovieId,
|
|
|
|
|
principalTable: "MovieRequests",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
});
|
|
|
|
@ -411,34 +397,6 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "MovieIssues",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Description = table.Column<string>(nullable: true),
|
|
|
|
|
IssueId = table.Column<int>(nullable: true),
|
|
|
|
|
MovieId = table.Column<int>(nullable: false),
|
|
|
|
|
Subect = table.Column<string>(nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_MovieIssues", x => x.Id);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_MovieIssues_MovieRequests_IssueId",
|
|
|
|
|
column: x => x.IssueId,
|
|
|
|
|
principalTable: "MovieRequests",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
|
table.ForeignKey(
|
|
|
|
|
name: "FK_MovieIssues_MovieRequests_MovieId",
|
|
|
|
|
column: x => x.MovieId,
|
|
|
|
|
principalTable: "MovieRequests",
|
|
|
|
|
principalColumn: "Id",
|
|
|
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "EpisodeRequests",
|
|
|
|
|
columns: table => new
|
|
|
|
@ -491,11 +449,6 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
table: "AspNetUserRoles",
|
|
|
|
|
column: "RoleId");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "IX_EmailTokens_UserId",
|
|
|
|
|
table: "EmailTokens",
|
|
|
|
|
column: "UserId");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
|
name: "EmailIndex",
|
|
|
|
|
table: "AspNetUsers",
|
|
|
|
@ -575,9 +528,6 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "AspNetUserTokens");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "EmailTokens");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "GlobalSettings");
|
|
|
|
|
|
|
|
|
@ -602,9 +552,6 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "AspNetRoles");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "AspNetUsers");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "PlexContent");
|
|
|
|
|
|
|
|
|
@ -621,7 +568,7 @@ namespace Ombi.Store.Migrations
|
|
|
|
|
name: "TvRequests");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "OldUsers");
|
|
|
|
|
name: "AspNetUsers");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|