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