Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
4eccee2a
Commit
4eccee2a
authored
Jan 4, 2016
by
miigotu
Browse files
Options
Downloads
Patches
Plain Diff
Another missed update for cache.db
parent
0ea37b38
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/databases/cache_db.py
+14
-3
14 additions, 3 deletions
sickbeard/databases/cache_db.py
with
14 additions
and
3 deletions
sickbeard/databases/cache_db.py
+
14
−
3
View file @
4eccee2a
...
...
@@ -30,7 +30,7 @@ class InitialSchema(db.SchemaUpgrade):
queries
=
[
(
"
CREATE TABLE lastUpdate (provider TEXT, time NUMERIC);
"
,),
(
"
CREATE TABLE lastSearch (provider TEXT, time NUMERIC);
"
,),
(
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER
KEY
, show_name TEXT, season NUMERIC DEFAULT -1, custom NUMERIC DEFAULT 0);
"
,),
(
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER, show_name TEXT, season NUMERIC DEFAULT -1, custom NUMERIC DEFAULT 0);
"
,),
(
"
CREATE TABLE scene_names (indexer_id INTEGER, name TEXT);
"
,),
(
"
CREATE TABLE network_timezones (network_name TEXT PRIMARY KEY, timezone TEXT);
"
,),
(
"
CREATE TABLE scene_exceptions_refresh (list TEXT PRIMARY KEY, last_refreshed INTEGER);
"
,),
...
...
@@ -50,7 +50,7 @@ class AddSceneExceptions(InitialSchema):
def
execute
(
self
):
self
.
connection
.
action
(
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER
KEY
, show_name TEXT);
"
)
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER, show_name TEXT);
"
)
class
AddSceneNameCache
(
AddSceneExceptions
):
...
...
@@ -108,6 +108,17 @@ class ConvertSceneExeptionsToIndexerScheme(AddSceneExceptionsRefresh):
def
execute
(
self
):
self
.
connection
.
action
(
"
DROP TABLE IF EXISTS tmp_scene_exceptions;
"
)
self
.
connection
.
action
(
"
ALTER TABLE scene_exceptions RENAME TO tmp_scene_exceptions;
"
)
self
.
connection
.
action
(
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER
KEY
, show_name TEXT, season NUMERIC DEFAULT -1, custom NUMERIC DEFAULT 0);
"
)
self
.
connection
.
action
(
"
CREATE TABLE scene_exceptions (exception_id INTEGER PRIMARY KEY, indexer_id INTEGER, show_name TEXT, season NUMERIC DEFAULT -1, custom NUMERIC DEFAULT 0);
"
)
self
.
connection
.
action
(
"
INSERT INTO scene_exceptions SELECT exception_id, tvdb_id as indexer_id, show_name, season, custom FROM tmp_scene_exceptions;
"
)
self
.
connection
.
action
(
"
DROP TABLE tmp_scene_exceptions;
"
)
class
ConvertSceneNamesToIndexerScheme
(
AddSceneExceptionsRefresh
):
def
test
(
self
):
return
self
.
hasColumn
(
"
scene_names
"
,
"
indexer_id
"
)
def
execute
(
self
):
self
.
connection
.
action
(
"
DROP TABLE IF EXISTS tmp_scene_names;
"
)
self
.
connection
.
action
(
"
ALTER TABLE scene_names RENAME TO tmp_scene_names;
"
)
self
.
connection
.
action
(
"
CREATE TABLE scene_names (indexer_id INTEGER, name TEXT);
"
)
self
.
connection
.
action
(
"
INSERT INTO scene_names SELECT * FROM tmp_scene_names;
"
)
self
.
connection
.
action
(
"
DROP TABLE tmp_scene_names;
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment