From 7d6e73f0268e9ab9bce32a4fae6c2ddc5bdd9ef5 Mon Sep 17 00:00:00 2001 From: echel0n Date: Mon, 12 May 2014 12:18:27 -0700 Subject: [PATCH] Fix for migration issues --- sickbeard/databases/mainDB.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 3ff0c885..b8e298f7 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -548,10 +548,11 @@ class AddSubtitlesSupport(AddDvdOrderOption): return self.checkDBVersion() >= 21 def execute(self): - self.addColumn("tv_shows", "subtitles") - self.addColumn("tv_episodes", "subtitles", "TEXT", "") - self.addColumn("tv_episodes", "subtitles_searchcount") - self.addColumn("tv_episodes", "subtitles_lastsearch", "TIMESTAMP", str(datetime.datetime.min)) + if not self.hasColumn("tv_shows", "subtitles"): + self.addColumn("tv_shows", "subtitles") + self.addColumn("tv_episodes", "subtitles", "TEXT", "") + self.addColumn("tv_episodes", "subtitles_searchcount") + self.addColumn("tv_episodes", "subtitles_lastsearch", "TIMESTAMP", str(datetime.datetime.min)) self.incDBVersion() class ConvertTVShowsToIndexerScheme(AddSubtitlesSupport):