mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Testing fix for unique index error on xem_numbering table in cache database
This commit is contained in:
parent
f2fb9076ad
commit
9ab143dde7
@ -7,6 +7,8 @@ import ConfigParser
|
||||
import logging
|
||||
|
||||
#Needed for importing logging & requests module
|
||||
from sickbeard.exceptions import ex
|
||||
|
||||
sickbeardPath = os.path.split(os.path.split(sys.argv[0])[0])[0]
|
||||
sys.path.append(os.path.join( sickbeardPath, 'lib'))
|
||||
sys.path.append(sickbeardPath)
|
||||
|
@ -68,8 +68,10 @@ class AddXemNumbering(AddNetworkTimezones):
|
||||
|
||||
def execute(self):
|
||||
self.connection.action(
|
||||
"CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER, season INTEGER, episode INTEGER, scene_season INTEGER, scene_episode INTEGER, PRIMARY KEY (indexer, indexer_id, season, episode))")
|
||||
"CREATE TABLE xem_numbering (indexer TEXT, indexer_id INTEGER PRIMARY KEY, season INTEGER, episode INTEGER, scene_season INTEGER, scene_episode INTEGER)")
|
||||
|
||||
self.connection.action(
|
||||
"CREATE UNIQUE INDEX idx_xem_numbering_indexer_id ON xem_numbering (indexer_id);")
|
||||
|
||||
class AddXemRefresh(AddXemNumbering):
|
||||
def test(self):
|
||||
@ -79,6 +81,9 @@ class AddXemRefresh(AddXemNumbering):
|
||||
self.connection.action(
|
||||
"CREATE TABLE xem_refresh (indexer TEXT, indexer_id INTEGER PRIMARY KEY, last_refreshed INTEGER)")
|
||||
|
||||
self.connection.action(
|
||||
"CREATE INDEX idx_xem_refresh_indexer_id ON xem_refresh (indexer_id);")
|
||||
|
||||
|
||||
class ConvertSceneExceptionsToIndexerID(AddXemRefresh):
|
||||
def test(self):
|
||||
|
@ -82,8 +82,7 @@ from sickbeard import browser
|
||||
|
||||
class PageTemplate(Template):
|
||||
def __init__(self, *args, **KWs):
|
||||
KWs['file'] = os.path.join(sickbeard.PROG_DIR, "gui/" + sickbeard.GUI_NAME + "/interfaces/default/",
|
||||
KWs['file'])
|
||||
KWs['file'] = os.path.join(sickbeard.PROG_DIR, "gui/" + sickbeard.GUI_NAME + "/interfaces/default/",KWs['file'])
|
||||
super(PageTemplate, self).__init__(*args, **KWs)
|
||||
self.sbRoot = sickbeard.WEB_ROOT
|
||||
self.sbHttpPort = sickbeard.WEB_PORT
|
||||
|
Loading…
Reference in New Issue
Block a user