Wrap DB_INIT in a transaction.
This commit is contained in:
parent
d6d7521bce
commit
25ed427272
1 changed files with 2 additions and 0 deletions
|
@ -54,6 +54,7 @@ PRAGMA foreign_keys = ON;
|
||||||
'''
|
'''
|
||||||
|
|
||||||
DB_INIT = f'''
|
DB_INIT = f'''
|
||||||
|
BEGIN;
|
||||||
{DB_PRAGMAS}
|
{DB_PRAGMAS}
|
||||||
{DB_VERSION_PRAGMA}
|
{DB_VERSION_PRAGMA}
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
||||||
|
@ -186,6 +187,7 @@ CREATE TABLE IF NOT EXISTS tag_synonyms(
|
||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS index_tag_synonyms_name on tag_synonyms(name);
|
CREATE INDEX IF NOT EXISTS index_tag_synonyms_name on tag_synonyms(name);
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
||||||
|
COMMIT;
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def _extract_table_statements(script):
|
def _extract_table_statements(script):
|
||||||
|
|
Loading…
Reference in a new issue