From efbe052b26eb2009bc382194a5d7b64f112fe287 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 30 Dec 2014 15:39:57 -0800 Subject: [PATCH] Fixed: Remove bad ratings from trakt --- .../Datastore/Migration/073_clear_ratings.cs | 20 +++++++++++++++++++ src/NzbDrone.Core/NzbDrone.Core.csproj | 1 + 2 files changed, 21 insertions(+) create mode 100644 src/NzbDrone.Core/Datastore/Migration/073_clear_ratings.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/073_clear_ratings.cs b/src/NzbDrone.Core/Datastore/Migration/073_clear_ratings.cs new file mode 100644 index 000000000..ef9c4074f --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/073_clear_ratings.cs @@ -0,0 +1,20 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(73)] + public class clear_ratings : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Update.Table("Series") + .Set(new {Ratings = "{}"}) + .AllRows(); + + Update.Table("Episodes") + .Set(new { Ratings = "{}" }) + .AllRows(); + } + } +} diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 16c5df788..4dff656ff 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -232,6 +232,7 @@ +