mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 10:17:47 +00:00
25 lines
No EOL
859 B
C#
25 lines
No EOL
859 B
C#
using System;
|
|
using System.Data;
|
|
using Migrator.Framework;
|
|
using NzbDrone.Common;
|
|
|
|
namespace NzbDrone.Core.Datastore.Migrations
|
|
{
|
|
|
|
[Migration(20120727)]
|
|
public class Migration20120727 : NzbDroneMigration
|
|
{
|
|
protected override void MainDbUpgrade()
|
|
{
|
|
Database.ExecuteNonQuery(@"DELETE FROM History
|
|
WHERE HistoryId IN
|
|
(
|
|
SELECT History.HistoryId
|
|
FROM History
|
|
LEFT OUTER JOIN Episodes
|
|
ON History.EpisodeId = Episodes.EpisodeId
|
|
WHERE Episodes.Title is null
|
|
)");
|
|
}
|
|
}
|
|
} |