LANCommander/LANCommander.Server.Data.SQLite/Migrations/20240223230404_RelaxNullableStrings.cs

80 lines
2.4 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LANCommander.Migrations
{
/// <inheritdoc />
public partial class RelaxNullableStrings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "WorkingDirectory",
table: "SavePaths",
type: "TEXT",
nullable: true,
oldClrType: typeof(string),
oldType: "TEXT");
migrationBuilder.AlterColumn<string>(
name: "SourceUrl",
table: "Media",
type: "TEXT",
maxLength: 2048,
nullable: true,
oldClrType: typeof(string),
oldType: "TEXT",
oldMaxLength: 2048);
migrationBuilder.AlterColumn<string>(
name: "MimeType",
table: "Media",
type: "TEXT",
maxLength: 255,
nullable: true,
oldClrType: typeof(string),
oldType: "TEXT",
oldMaxLength: 255);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "WorkingDirectory",
table: "SavePaths",
type: "TEXT",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "TEXT",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "SourceUrl",
table: "Media",
type: "TEXT",
maxLength: 2048,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "TEXT",
oldMaxLength: 2048,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "MimeType",
table: "Media",
type: "TEXT",
maxLength: 255,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "TEXT",
oldMaxLength: 255,
oldNullable: true);
}
}
}