From e7cf923cc03c42a982f09cd75c337ea4068dcb3c Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 22 Apr 2014 03:30:18 -0700 Subject: [PATCH] Removes primary keys and unique keys from xem_numbering table in cache.db --- sickbeard/databases/cache_db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sickbeard/databases/cache_db.py b/sickbeard/databases/cache_db.py index d5e23b80..cbfb5a3e 100644 --- a/sickbeard/databases/cache_db.py +++ b/sickbeard/databases/cache_db.py @@ -108,3 +108,8 @@ class ConvertIndexerToInteger(ConvertSceneNamesToIndexerID): ql.append(["UPDATE xem_refresh SET indexer = ? WHERE LOWER(indexer) = ?", ["1", "tvdb"]]) ql.append(["UPDATE xem_refresh SET indexer = ? WHERE LOWER(indexer) = ?", ["2", "tvrage"]]) self.connection.mass_action(ql) + +class RemoveKeysFromXemNumbering(ConvertIndexerToInteger): + def execute(self): + self.connection.action("ALTER TABLE xem_numbering DROP UNIQUE (indexer, indexer_id, season, episode)") + self.connection.action("ALTER TABLE xem_numbering DROP PRIMARY KEY") \ No newline at end of file