47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Moonlight.Api.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class SwitchedToJsonForSettingsOption : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Value",
|
|
schema: "core",
|
|
table: "SettingsOptions");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ValueJson",
|
|
schema: "core",
|
|
table: "SettingsOptions",
|
|
type: "jsonb",
|
|
maxLength: 4096,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ValueJson",
|
|
schema: "core",
|
|
table: "SettingsOptions");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Value",
|
|
schema: "core",
|
|
table: "SettingsOptions",
|
|
type: "character varying(4096)",
|
|
maxLength: 4096,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
}
|
|
}
|