using Microsoft.EntityFrameworkCore.Migrations;
namespace DataLayer.Postgres.Migrations;
///
public partial class MakeDbNullable : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Name",
table: "Categories");
migrationBuilder.AlterColumn(
name: "Url",
table: "Supplement",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "AudibleSeriesId",
table: "Series",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Account",
table: "LibraryBooks",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Name",
table: "Contributors",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "AudibleCategoryId",
table: "Categories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "Books",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Subtitle",
table: "Books",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Rating_StoryRating",
table: "Books",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Rating_PerformanceRating",
table: "Books",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Rating_OverallRating",
table: "Books",
type: "real",
nullable: false,
defaultValue: 0f,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Locale",
table: "Books",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "Description",
table: "Books",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn(
name: "AudibleProductId",
table: "Books",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "Url",
table: "Supplement",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "AudibleSeriesId",
table: "Series",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Account",
table: "LibraryBooks",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Name",
table: "Contributors",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "AudibleCategoryId",
table: "Categories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddColumn(
name: "Name",
table: "Categories",
type: "text",
nullable: true);
migrationBuilder.AlterColumn(
name: "Title",
table: "Books",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Subtitle",
table: "Books",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Rating_StoryRating",
table: "Books",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn(
name: "Rating_PerformanceRating",
table: "Books",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn(
name: "Rating_OverallRating",
table: "Books",
type: "real",
nullable: true,
oldClrType: typeof(float),
oldType: "real");
migrationBuilder.AlterColumn(
name: "Locale",
table: "Books",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "Description",
table: "Books",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn(
name: "AudibleProductId",
table: "Books",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
}
}