using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Data.Migrations
{
///
public partial class ScrobbleEventProcessed : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SyncHistory");
migrationBuilder.AddColumn(
name: "IsProcessed",
table: "ScrobbleEvent",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "ProcessDateUtc",
table: "ScrobbleEvent",
type: "TEXT",
nullable: true);
migrationBuilder.AlterColumn(
name: "ManageReadingLists",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
migrationBuilder.AlterColumn(
name: "ManageCollections",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
migrationBuilder.AlterColumn(
name: "IncludeInSearch",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
migrationBuilder.AlterColumn(
name: "IncludeInRecommended",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
migrationBuilder.AlterColumn(
name: "IncludeInDashboard",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
migrationBuilder.AlterColumn(
name: "FolderWatching",
table: "Library",
type: "INTEGER",
nullable: false,
oldClrType: typeof(bool),
oldType: "INTEGER",
oldDefaultValue: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsProcessed",
table: "ScrobbleEvent");
migrationBuilder.DropColumn(
name: "ProcessDateUtc",
table: "ScrobbleEvent");
migrationBuilder.AlterColumn(
name: "ManageReadingLists",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.AlterColumn(
name: "ManageCollections",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.AlterColumn(
name: "IncludeInSearch",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.AlterColumn(
name: "IncludeInRecommended",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.AlterColumn(
name: "IncludeInDashboard",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.AlterColumn(
name: "FolderWatching",
table: "Library",
type: "INTEGER",
nullable: false,
defaultValue: true,
oldClrType: typeof(bool),
oldType: "INTEGER");
migrationBuilder.CreateTable(
name: "SyncHistory",
columns: table => new
{
Key = table.Column(type: "INTEGER", nullable: false),
Value = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SyncHistory", x => x.Key);
});
}
}
}