mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.5 KiB
47 lines
1.5 KiB
using System; |
|
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
#nullable disable |
|
|
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
|
{ |
|
/// <inheritdoc /> |
|
public partial class Add_PlexCollection : Migration |
|
{ |
|
/// <inheritdoc /> |
|
protected override void Up(MigrationBuilder migrationBuilder) |
|
{ |
|
migrationBuilder.AddColumn<DateTime>( |
|
name: "LastCollectionsScan", |
|
table: "PlexMediaSource", |
|
type: "TEXT", |
|
nullable: true); |
|
|
|
migrationBuilder.CreateTable( |
|
name: "PlexCollection", |
|
columns: table => new |
|
{ |
|
Id = table.Column<int>(type: "INTEGER", nullable: false) |
|
.Annotation("Sqlite:Autoincrement", true), |
|
Key = table.Column<string>(type: "TEXT", nullable: true), |
|
Etag = table.Column<string>(type: "TEXT", nullable: true), |
|
Name = table.Column<string>(type: "TEXT", nullable: true) |
|
}, |
|
constraints: table => |
|
{ |
|
table.PrimaryKey("PK_PlexCollection", x => x.Id); |
|
}); |
|
} |
|
|
|
/// <inheritdoc /> |
|
protected override void Down(MigrationBuilder migrationBuilder) |
|
{ |
|
migrationBuilder.DropTable( |
|
name: "PlexCollection"); |
|
|
|
migrationBuilder.DropColumn( |
|
name: "LastCollectionsScan", |
|
table: "PlexMediaSource"); |
|
} |
|
} |
|
}
|
|
|