142 lines
4.5 KiB
C#
142 lines
4.5 KiB
C#
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<int>(
|
|
name: "RdStatus",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: true,
|
|
oldClrType: typeof(int),
|
|
oldType: "INTEGER");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdSplit",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: true,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdSize",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: true,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER");
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdProgress",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: true,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER");
|
|
|
|
migrationBuilder.AlterColumn<DateTimeOffset>(
|
|
name: "RdAdded",
|
|
table: "Torrents",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTimeOffset),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Hash",
|
|
table: "Torrents",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Path",
|
|
table: "Downloads",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
defaultValue: "",
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT",
|
|
oldNullable: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "RdStatus",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
oldClrType: typeof(int),
|
|
oldType: "INTEGER",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdSplit",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0L,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdSize",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0L,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<long>(
|
|
name: "RdProgress",
|
|
table: "Torrents",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0L,
|
|
oldClrType: typeof(long),
|
|
oldType: "INTEGER",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<DateTimeOffset>(
|
|
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<string>(
|
|
name: "Hash",
|
|
table: "Torrents",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Path",
|
|
table: "Downloads",
|
|
type: "TEXT",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
}
|
|
}
|
|
}
|