set synchronous and foreign_keys on startup
This commit is contained in:
parent
08c4187d70
commit
5390181cfa
1 changed files with 2 additions and 3 deletions
|
@ -12,9 +12,6 @@ log.setLevel(logging.INFO)
|
||||||
schema = """
|
schema = """
|
||||||
PRAGMA user_version = 1;
|
PRAGMA user_version = 1;
|
||||||
|
|
||||||
PRAGMA main.synchronous = NORMAL;
|
|
||||||
PRAGMA foreign_keys = ON;
|
|
||||||
|
|
||||||
CREATE TABLE keywords (
|
CREATE TABLE keywords (
|
||||||
guild_id INTEGER NOT NULL,
|
guild_id INTEGER NOT NULL,
|
||||||
keyword TEXT NOT NULL,
|
keyword TEXT NOT NULL,
|
||||||
|
@ -80,6 +77,8 @@ async def setup_db(db_file):
|
||||||
log.debug("Running start script")
|
log.debug("Running start script")
|
||||||
await db.executescript("""
|
await db.executescript("""
|
||||||
PRAGMA optimize(0x10002);
|
PRAGMA optimize(0x10002);
|
||||||
|
PRAGMA main.synchronous = NORMAL;
|
||||||
|
PRAGMA foreign_keys = ON;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
log.debug("Adding contains function")
|
log.debug("Adding contains function")
|
||||||
|
|
Loading…
Reference in a new issue