1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-25 17:27:59 +00:00
Radarr/NzbDrone.Core/Datastore/Migrations/Migration20121122.cs
Mark McDowall eddbd4a97b Renamed some settings, added 2nd priority for sab
New: Separated priorities for new and old episodes when sent to SABnzbd
2012-11-22 18:56:27 -08:00

22 lines
No EOL
831 B
C#

using System;
using System.Data;
using Migrator.Framework;
using NzbDrone.Common;
namespace NzbDrone.Core.Datastore.Migrations
{
[Migration(20121122)]
public class Migration20121122 : NzbDroneMigration
{
protected override void MainDbUpgrade()
{
Database.ExecuteNonQuery("UPDATE Config SET [KEY] = 'SabBacklogTvPriority' WHERE [KEY] = 'SabTvPriority'");
Database.ExecuteNonQuery("UPDATE Config SET [KEY] = 'SabTvDropDirectory ' WHERE [KEY] = 'DownloadClientTvDirectory'");
var priority = Database.ExecuteScalar("SELECT [Value] FROM Config WHERE [Key] = 'SabBacklogTvPriority'");
if (priority != null)
Database.ExecuteNonQuery("INSERT INTO Config ([Key], [Value]) VALUES('SabRecentTvPriority', '" + priority + "')");
}
}
}