mysql migration

plex-watchlist-error-reporting
tidusjar 2 years ago
parent 65b2869ebe
commit a8e2cb549f

@ -0,0 +1,46 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Ombi.Store.Migrations.OmbiMySql
{
public partial class PlexWatchlistUserError : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PlexWatchlistUserError",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<string>(type: "varchar(255)", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MediaServerToken = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_PlexWatchlistUserError", x => x.Id);
table.ForeignKey(
name: "FK_PlexWatchlistUserError_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_PlexWatchlistUserError_UserId",
table: "PlexWatchlistUserError",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PlexWatchlistUserError");
}
}
}

@ -350,6 +350,25 @@ namespace Ombi.Store.Migrations.OmbiMySql
b.ToTable("AspNetUsers", (string)null); b.ToTable("AspNetUsers", (string)null);
}); });
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<string>("MediaServerToken")
.HasColumnType("longtext");
b.Property<string>("UserId")
.HasColumnType("varchar(255)");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("PlexWatchlistUserError");
});
modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b => modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
{ {
b.Property<int>("Id") b.Property<int>("Id")
@ -1093,6 +1112,15 @@ namespace Ombi.Store.Migrations.OmbiMySql
b.Navigation("User"); 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 => modelBuilder.Entity("Ombi.Store.Entities.Requests.AlbumRequest", b =>
{ {
b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser") b.HasOne("Ombi.Store.Entities.OmbiUser", "RequestedUser")

Loading…
Cancel
Save