You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
624 B
19 lines
624 B
using FluentMigrator;
|
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
|
|
|
namespace NzbDrone.Core.Datastore.Migration
|
|
{
|
|
[Migration(8)]
|
|
public class change_quality_size_mb_to_kb : NzbDroneMigrationBase
|
|
{
|
|
protected override void MainDbUpgrade()
|
|
{
|
|
IfDatabase("sqlite").Execute.Sql("UPDATE QualityDefinitions SET MaxSize = CASE " +
|
|
"WHEN (CAST(MaxSize AS FLOAT) / 60) * 8 * 1024 < 1500 THEN " +
|
|
"ROUND((CAST(MaxSize AS FLOAT) / 60) * 8 * 1024, 0) " +
|
|
"ELSE NULL " +
|
|
"END");
|
|
}
|
|
}
|
|
}
|