Wrap DB_INIT in a transaction.

This commit is contained in:
voussoir 2020-02-04 18:43:30 -08:00
parent d6d7521bce
commit 25ed427272

View file

@ -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):