fix database migration (#35)

This commit is contained in:
Jason Dove
2021-03-02 18:32:14 +00:00
committed by GitHub
parent 09578beef5
commit 3ed83a276f
2 changed files with 8 additions and 2 deletions
@@ -11,7 +11,7 @@ namespace ErsatzTV.Infrastructure.Migrations
migrationBuilder.Sql(
@$"INSERT INTO NewMovieMetadata (Outline, Plot, Tagline, MovieId, MetadataKind, Title, OriginalTitle, SortTitle, ReleaseDate, DateAdded, DateUpdated)
SELECT mm.Outline, mm.Plot, mm.Tagline, m.Id, mm.Source, mm.Title, null, mm.SortTitle, mm.Premiered, '{now}', mm.LastWriteTime
SELECT mm.Outline, mm.Plot, mm.Tagline, m.Id, mm.Source, mm.Title, null, mm.SortTitle, mm.Premiered, '{now}', IFNULL(mm.LastWriteTime, '0001-01-01 00:00:00')
FROM MovieMetadata mm
INNER JOIN Movie m ON mm.MovieId = m.Id");
}