1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/NzbDrone.Core/Datastore/Migrations/Migration20120227.cs

19 lines
650 B
C#
Raw Normal View History

using Migrator.Framework;
namespace NzbDrone.Core.Datastore.Migrations
{
[Migration(20120227)]
public class Migration20120227 : NzbDroneMigration
{
protected override void MainDbUpgrade()
{
Database.ExecuteNonQuery(@"DELETE FROM Seasons WHERE SeasonNumber NOT IN
(
SELECT DISTINCT SeasonNumber
FROM Episodes
WHERE Seasons.SeriesId = Episodes.SeriesId
)");
}
}
}