|
|
|
@ -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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|