70 lines
2.0 KiB
C#
70 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Aberwyn.Migrations
|
|
{
|
|
public partial class AddTorrentTablesv2 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Completed",
|
|
table: "TorrentItems",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "DownloadKey",
|
|
table: "TorrentItems",
|
|
type: "longtext",
|
|
nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "MovieName",
|
|
table: "TorrentItems",
|
|
type: "longtext",
|
|
nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Token",
|
|
table: "TorrentItems",
|
|
type: "longtext",
|
|
nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Year",
|
|
table: "TorrentItems",
|
|
type: "int",
|
|
nullable: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Completed",
|
|
table: "TorrentItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DownloadKey",
|
|
table: "TorrentItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MovieName",
|
|
table: "TorrentItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Token",
|
|
table: "TorrentItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Year",
|
|
table: "TorrentItems");
|
|
}
|
|
}
|
|
}
|