using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Data.Migrations
{
///
public partial class ScrobbleHolds : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ScrobbleHold",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
SeriesId = table.Column(type: "INTEGER", nullable: false),
AppUserId = table.Column(type: "INTEGER", nullable: false),
Created = table.Column(type: "TEXT", nullable: false),
CreatedUtc = table.Column(type: "TEXT", nullable: false),
LastModified = table.Column(type: "TEXT", nullable: false),
LastModifiedUtc = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ScrobbleHold", x => x.Id);
table.ForeignKey(
name: "FK_ScrobbleHold_AspNetUsers_AppUserId",
column: x => x.AppUserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ScrobbleHold_Series_SeriesId",
column: x => x.SeriesId,
principalTable: "Series",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_ScrobbleHold_AppUserId",
table: "ScrobbleHold",
column: "AppUserId");
migrationBuilder.CreateIndex(
name: "IX_ScrobbleHold_SeriesId",
table: "ScrobbleHold",
column: "SeriesId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ScrobbleHold");
}
}
}