From 2d2b2e5873a617843d2706e0e0fd5980820f8179 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 14 Aug 2022 23:04:05 +0200 Subject: [PATCH] Enable WAL mode for the DB --- ...08_14_2059-6286262bb466_enable_wal_mode.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 alembic/versions/2022_08_14_2059-6286262bb466_enable_wal_mode.py diff --git a/alembic/versions/2022_08_14_2059-6286262bb466_enable_wal_mode.py b/alembic/versions/2022_08_14_2059-6286262bb466_enable_wal_mode.py new file mode 100644 index 0000000..970b11d --- /dev/null +++ b/alembic/versions/2022_08_14_2059-6286262bb466_enable_wal_mode.py @@ -0,0 +1,22 @@ +"""Enable WAL mode + +Revision ID: 6286262bb466 +Revises: 9bc69ed947e2 +Create Date: 2022-08-14 20:59:26.427796+00:00 + +""" +from alembic import op + +# revision identifiers, used by Alembic. +revision = '6286262bb466' +down_revision = '9bc69ed947e2' +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.execute("PRAGMA journal_mode=WAL") + + +def downgrade() -> None: + op.execute("PRAGMA journal_mode=DELETE")