mirror of https://github.com/ErsatzTV/ErsatzTV.git
5 changed files with 2925 additions and 0 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Migrations |
||||||
|
{ |
||||||
|
public partial class Delete_JellyfinStrmFiles : Migration |
||||||
|
{ |
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.Sql( |
||||||
|
@"DELETE FROM MediaItem WHERE Id IN
|
||||||
|
(SELECT MI.Id FROM MediaItem MI |
||||||
|
INNER JOIN MediaVersion MV on MV.MovieId = MI.Id |
||||||
|
INNER JOIN MediaFile MF on MV.Id = MF.MediaVersionId |
||||||
|
WHERE MF.Path LIKE '%.strm')");
|
||||||
|
} |
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue