mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Merge branch 'fix_sqlite_DQS' of https://github.com/madpilot78/calibre
This commit is contained in:
commit
fead46be48
@ -1385,8 +1385,8 @@ class DB:
|
|||||||
@property
|
@property
|
||||||
def custom_tables(self):
|
def custom_tables(self):
|
||||||
return {x[0] for x in self.conn.get(
|
return {x[0] for x in self.conn.get(
|
||||||
'SELECT name FROM sqlite_master WHERE type="table" AND '
|
'SELECT name FROM sqlite_master WHERE type=\'table\' AND '
|
||||||
'(name GLOB "custom_column_*" OR name GLOB "books_custom_column_*")')}
|
'(name GLOB \'custom_column_*\' OR name GLOB \'books_custom_column_*\')')}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def exists_at(cls, path):
|
def exists_at(cls, path):
|
||||||
|
@ -300,7 +300,7 @@ class SchemaUpgrade:
|
|||||||
for field in itervalues(self.field_metadata):
|
for field in itervalues(self.field_metadata):
|
||||||
if field['is_category'] and not field['is_custom'] and 'link_column' in field:
|
if field['is_category'] and not field['is_custom'] and 'link_column' in field:
|
||||||
table = self.db.get(
|
table = self.db.get(
|
||||||
'SELECT name FROM sqlite_master WHERE type="table" AND name=?',
|
'SELECT name FROM sqlite_master WHERE type=\'table\' AND name=?',
|
||||||
('books_%s_link'%field['table'],), all=False)
|
('books_%s_link'%field['table'],), all=False)
|
||||||
if table is not None:
|
if table is not None:
|
||||||
create_tag_browser_view(field['table'], field['link_column'], field['column'])
|
create_tag_browser_view(field['table'], field['link_column'], field['column'])
|
||||||
@ -376,7 +376,7 @@ class SchemaUpgrade:
|
|||||||
for field in itervalues(self.field_metadata):
|
for field in itervalues(self.field_metadata):
|
||||||
if field['is_category'] and not field['is_custom'] and 'link_column' in field:
|
if field['is_category'] and not field['is_custom'] and 'link_column' in field:
|
||||||
table = self.db.get(
|
table = self.db.get(
|
||||||
'SELECT name FROM sqlite_master WHERE type="table" AND name=?',
|
'SELECT name FROM sqlite_master WHERE type=\'table\' AND name=?',
|
||||||
('books_%s_link'%field['table'],), all=False)
|
('books_%s_link'%field['table'],), all=False)
|
||||||
if table is not None:
|
if table is not None:
|
||||||
create_std_tag_browser_view(field['table'], field['link_column'],
|
create_std_tag_browser_view(field['table'], field['link_column'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user