From 28857e7facc417522f149677ccb641eb3f3ba132 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Tue, 3 Jan 2017 23:59:41 +0100 Subject: [PATCH] Fixes issue with History table. --- .../Datastore/Migration/004_updated_history.cs | 3 +-- .../Migration/105_fix_history_movieId.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/105_fix_history_movieId.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/004_updated_history.cs b/src/NzbDrone.Core/Datastore/Migration/004_updated_history.cs index e43924e77..5ebc51ac8 100644 --- a/src/NzbDrone.Core/Datastore/Migration/004_updated_history.cs +++ b/src/NzbDrone.Core/Datastore/Migration/004_updated_history.cs @@ -17,8 +17,7 @@ protected override void MainDbUpgrade() .WithColumn("SourceTitle").AsString() .WithColumn("Date").AsDateTime() .WithColumn("Quality").AsString() - .WithColumn("Data").AsString() - .WithColumn("MovieId").AsInt32().WithDefaultValue(0); + .WithColumn("Data").AsString(); } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/105_fix_history_movieId.cs b/src/NzbDrone.Core/Datastore/Migration/105_fix_history_movieId.cs new file mode 100644 index 000000000..5de372a15 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/105_fix_history_movieId.cs @@ -0,0 +1,15 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(105)] + public class fix_history_movieId : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Alter.Table("History") + .AddColumn("MovieId").AsInt32().WithDefaultValue(0); + } + } +}