From 8fa43fb9f74a98f42c38a94c455190cc786c1334 Mon Sep 17 00:00:00 2001
From: Leonardo Galli <leonardo.galli@bluewin.ch>
Date: Thu, 5 Jan 2017 14:36:58 +0100
Subject: [PATCH] Fix for Path column in MovieFiles table.

---
 .../Datastore/Migration/107_fix_movie_files.cs     | 14 ++++++++++++++
 src/NzbDrone.Core/NzbDrone.Core.csproj             |  1 +
 2 files changed, 15 insertions(+)
 create mode 100644 src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs

diff --git a/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs b/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs
new file mode 100644
index 000000000..d1b82b862
--- /dev/null
+++ b/src/NzbDrone.Core/Datastore/Migration/107_fix_movie_files.cs
@@ -0,0 +1,14 @@
+using FluentMigrator;
+using NzbDrone.Core.Datastore.Migration.Framework;
+
+namespace NzbDrone.Core.Datastore.Migration
+{
+    [Migration(107)]
+    public class fix_movie_files : NzbDroneMigrationBase
+    {
+        protected override void MainDbUpgrade()
+        {
+            Alter.Table("MovieFiles").AlterColumn("Path").AsString().Nullable(); //Should be deleted, but to much work, ¯\_(ツ)_/¯
+        }
+    }
+}
diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj
index 286f569bc..06c19aaa5 100644
--- a/src/NzbDrone.Core/NzbDrone.Core.csproj
+++ b/src/NzbDrone.Core/NzbDrone.Core.csproj
@@ -183,6 +183,7 @@
     <Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
     <Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
     <Compile Include="Datastore\Migration\004_updated_history.cs" />
+    <Compile Include="Datastore\Migration\107_fix_movie_files.cs" />
     <Compile Include="Datastore\Migration\106_add_tmdb_stuff.cs" />
     <Compile Include="Datastore\Migration\105_fix_history_movieId.cs" />
     <Compile Include="Datastore\Migration\005_added_eventtype_to_history.cs" />