Added the root folders and qualities per user!

This commit is contained in:
Jamie 2018-09-20 21:34:31 +01:00
commit 91b6dfe2b7
9 changed files with 1313 additions and 40 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,46 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Ombi.Store.Migrations
{
public partial class UserQualityProfiles : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "UserQualityProfiles",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserId = table.Column<string>(nullable: true),
SonarrQualityProfileAnime = table.Column<int>(nullable: false),
SonarrRootPathAnime = table.Column<int>(nullable: false),
SonarrRootPath = table.Column<int>(nullable: false),
SonarrQualityProfile = table.Column<int>(nullable: false),
RadarrRootPath = table.Column<int>(nullable: false),
RadarrQualityProfile = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserQualityProfiles", x => x.Id);
table.ForeignKey(
name: "FK_UserQualityProfiles_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_UserQualityProfiles_UserId",
table: "UserQualityProfiles",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "UserQualityProfiles");
}
}
}

View file

@ -890,6 +890,32 @@ namespace Ombi.Store.Migrations
b.ToTable("UserNotificationPreferences");
});
modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("RadarrQualityProfile");
b.Property<int>("RadarrRootPath");
b.Property<int>("SonarrQualityProfile");
b.Property<int>("SonarrQualityProfileAnime");
b.Property<int>("SonarrRootPath");
b.Property<int>("SonarrRootPathAnime");
b.Property<string>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserQualityProfiles");
});
modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b =>
{
b.Property<int>("Id")
@ -1095,6 +1121,13 @@ namespace Ombi.Store.Migrations
.HasForeignKey("UserId");
});
modelBuilder.Entity("Ombi.Store.Entities.UserQualityProfiles", b =>
{
b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("Ombi.Store.Repository.Requests.EpisodeRequests", b =>
{
b.HasOne("Ombi.Store.Repository.Requests.SeasonRequests", "Season")