sqlite migration

This commit is contained in:
tidusjar 2022-08-22 21:40:07 +01:00
commit 3708d1a061
5 changed files with 1382 additions and 1 deletions

View file

@ -28,7 +28,6 @@ namespace Ombi.Store.Context
public DbSet<PlexSeasonsContent> PlexSeasonsContent { get; set; }
public DbSet<PlexEpisode> PlexEpisode { get; set; }
public DbSet<PlexWatchlistHistory> PlexWatchlistHistory { get; set; }
public DbSet<PlexWatchlistUserError> PlexWatchListUserError { get; set; }
public DbSet<RadarrCache> RadarrCache { get; set; }
public DbSet<CouchPotatoCache> CouchPotatoCache { get; set; }
public DbSet<EmbyContent> EmbyContent { get; set; }

View file

@ -45,6 +45,7 @@ namespace Ombi.Store.Context
public DbSet<RequestLog> RequestLogs { get; set; }
public DbSet<RecentlyAddedLog> RecentlyAddedLogs { get; set; }
public DbSet<Votes> Votes { get; set; }
public DbSet<PlexWatchlistUserError> PlexWatchListUserError { get; set; }
public DbSet<Audit> Audit { get; set; }

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Ombi.Store.Migrations.OmbiSqlite
{
public partial class PlexWatchlistUserError : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PlexWatchlistUserError",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserId = table.Column<string>(type: "TEXT", nullable: true),
MediaServerToken = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexWatchlistUserError", x => x.Id);
table.ForeignKey(
name: "FK_PlexWatchlistUserError_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_PlexWatchlistUserError_UserId",
table: "PlexWatchlistUserError",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PlexWatchlistUserError");
}
}
}

View file

@ -348,6 +348,25 @@ namespace Ombi.Store.Migrations.OmbiSqlite
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("MediaServerToken")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("PlexWatchlistUserError");
});
modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
{
b.Property<int>("Id")
@ -1091,6 +1110,15 @@ namespace Ombi.Store.Migrations.OmbiSqlite
b.Navigation("User");
});
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
{
b.HasOne("Ombi.Store.Entities.OmbiUser", "User")
.WithMany()
.HasForeignKey("UserId");
b.Navigation("User");
});
modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b =>
{
b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser")