2020-11-27 03:12:04 +00:00
|
|
|
using FluentMigrator;
|
|
|
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Datastore.Migration
|
|
|
|
{
|
|
|
|
[Migration(188)]
|
|
|
|
public class mediainfo_channels : NzbDroneMigrationBase
|
|
|
|
{
|
|
|
|
protected override void MainDbUpgrade()
|
|
|
|
{
|
2022-03-28 20:45:52 +00:00
|
|
|
Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannels\"', '\"audioChannelsContainer\"');");
|
|
|
|
Execute.Sql("UPDATE \"MovieFiles\" SET \"MediaInfo\" = Replace(\"MediaInfo\", '\"audioChannelPositionsText\"', '\"audioChannelPositionsTextContainer\"');");
|
2020-11-27 03:12:04 +00:00
|
|
|
|
2022-11-20 18:27:45 +00:00
|
|
|
// Change List Interval from Min to Hour
|
2022-03-28 20:45:52 +00:00
|
|
|
IfDatabase("sqlite").Execute.Sql("UPDATE \"Config\" SET \"Value\" = max((\"Value\" / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'");
|
|
|
|
IfDatabase("postgres").Execute.Sql("UPDATE \"Config\" SET \"Value\" = greatest((\"Value\"::int / 60) + 1, 6) WHERE \"Key\" = 'importlistsyncinterval'");
|
2020-11-27 03:12:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|