Files
ersatztv/ErsatzTV.Infrastructure/Migrations/20210521015037_Add_LibraryFolder.cs
T
Jason DoveandGitHub 0799fe25d1 optimize local library scanning by using etags (#196)
* use etags to optimize local movie scanner

* use etags to optimize local television scanner

* use etags to optimize local music video scanner

* code cleanup
2021-05-21 06:18:07 -05:00

41 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Add_LibraryFolder : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
"LibraryFolder",
table => new
{
Id = table.Column<int>("INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Path = table.Column<string>("TEXT", nullable: true),
LibraryPathId = table.Column<int>("INTEGER", nullable: false),
Etag = table.Column<string>("TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_LibraryFolder", x => x.Id);
table.ForeignKey(
"FK_LibraryFolder_LibraryPath_LibraryPathId",
x => x.LibraryPathId,
"LibraryPath",
"Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
"IX_LibraryFolder_LibraryPathId",
"LibraryFolder",
"LibraryPathId");
}
protected override void Down(MigrationBuilder migrationBuilder) =>
migrationBuilder.DropTable(
"LibraryFolder");
}
}