Stream custom live channels using your own media
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.
 
 

80 lines
2.6 KiB

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
{
/// <inheritdoc />
public partial class Rework_LibraryFolder : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "LibraryFolderId",
table: "MediaFile",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ParentId",
table: "LibraryFolder",
type: "INTEGER",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_MediaFile_LibraryFolderId",
table: "MediaFile",
column: "LibraryFolderId");
migrationBuilder.CreateIndex(
name: "IX_LibraryFolder_ParentId",
table: "LibraryFolder",
column: "ParentId");
migrationBuilder.AddForeignKey(
name: "FK_LibraryFolder_LibraryFolder_ParentId",
table: "LibraryFolder",
column: "ParentId",
principalTable: "LibraryFolder",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_MediaFile_LibraryFolder_LibraryFolderId",
table: "MediaFile",
column: "LibraryFolderId",
principalTable: "LibraryFolder",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_LibraryFolder_LibraryFolder_ParentId",
table: "LibraryFolder");
migrationBuilder.DropForeignKey(
name: "FK_MediaFile_LibraryFolder_LibraryFolderId",
table: "MediaFile");
migrationBuilder.DropIndex(
name: "IX_MediaFile_LibraryFolderId",
table: "MediaFile");
migrationBuilder.DropIndex(
name: "IX_LibraryFolder_ParentId",
table: "LibraryFolder");
migrationBuilder.DropColumn(
name: "LibraryFolderId",
table: "MediaFile");
migrationBuilder.DropColumn(
name: "ParentId",
table: "LibraryFolder");
}
}
}