using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace RdtClient.Data.Migrations { public partial class Nullables : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RdStatus", table: "Torrents", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RdSplit", table: "Torrents", type: "INTEGER", nullable: true, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RdSize", table: "Torrents", type: "INTEGER", nullable: true, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RdProgress", table: "Torrents", type: "INTEGER", nullable: true, oldClrType: typeof(long), oldType: "INTEGER"); migrationBuilder.AlterColumn( name: "RdAdded", table: "Torrents", type: "TEXT", nullable: true, oldClrType: typeof(DateTimeOffset), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Hash", table: "Torrents", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Path", table: "Downloads", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RdStatus", table: "Torrents", type: "INTEGER", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "RdSplit", table: "Torrents", type: "INTEGER", nullable: false, defaultValue: 0L, oldClrType: typeof(long), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "RdSize", table: "Torrents", type: "INTEGER", nullable: false, defaultValue: 0L, oldClrType: typeof(long), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "RdProgress", table: "Torrents", type: "INTEGER", nullable: false, defaultValue: 0L, oldClrType: typeof(long), oldType: "INTEGER", oldNullable: true); migrationBuilder.AlterColumn( name: "RdAdded", table: "Torrents", type: "TEXT", nullable: false, defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)), oldClrType: typeof(DateTimeOffset), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "Hash", table: "Torrents", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "Path", table: "Downloads", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); } } }