Files
Libation/Source/DataLayer.Postgres/Migrations/20260107224301_AddIsAudiblePlus.cs
2026-01-07 15:50:23 -07:00

102 lines
3.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DataLayer.Postgres.Migrations
{
/// <inheritdoc />
public partial class AddIsAudiblePlus : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Tags",
table: "UserDefinedItem",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<float>(
name: "Rating_StoryRating",
table: "UserDefinedItem",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn<float>(
name: "Rating_PerformanceRating",
table: "UserDefinedItem",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn<float>(
name: "Rating_OverallRating",
table: "UserDefinedItem",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsAudiblePlus",
table: "LibraryBooks",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsAudiblePlus",
table: "LibraryBooks");
migrationBuilder.AlterColumn<string>(
name: "Tags",
table: "UserDefinedItem",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<float>(
name: "Rating_StoryRating",
table: "UserDefinedItem",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn<float>(
name: "Rating_PerformanceRating",
table: "UserDefinedItem",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn<float>(
name: "Rating_OverallRating",
table: "UserDefinedItem",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
}
}
}