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.
16 lines
532 B
16 lines
532 B
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
namespace ErsatzTV.Infrastructure.Migrations |
|
{ |
|
public partial class Delete_OrphanPlexMediaSources : Migration |
|
{ |
|
protected override void Up(MigrationBuilder migrationBuilder) => |
|
migrationBuilder.Sql( |
|
@"DELETE FROM MediaSource WHERE Id NOT IN |
|
(SELECT Id FROM LocalMediaSource UNION ALL SELECT Id FROM PlexMediaSource)"); |
|
|
|
protected override void Down(MigrationBuilder migrationBuilder) |
|
{ |
|
} |
|
} |
|
}
|
|
|