mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 11:05:44 +00:00
19 lines
650 B
C#
19 lines
650 B
C#
|
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
|
|||
|
)");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|