* refactor sqlite into separate library * support mysql * fixes * sql fixes * cleanup * update changelog
16 lines
501 B
C#
16 lines
501 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations
|
|
{
|
|
public partial class RemoveOldMediaSources : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder) =>
|
|
// remove old source/folders
|
|
migrationBuilder.Sql(@"DELETE FROM MediaSources WHERE Id NOT IN (SELECT MediaSourceId FROM Library)");
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
}
|
|
}
|
|
}
|