Files
Libation/Source/DataLayer.Postgres/Migrations/20260107224301_AddIsAudiblePlus.cs
Michael Bucari-Tovo 3ab1edc076 Code Cleanup
Make fields readonly
Remove unnecessary casts
Format document
Remove unnecessary usings
Sort usings
Use file-level namespaces
Order modifiers
2026-02-05 12:48:44 -07:00

99 lines
2.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
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");
}
}