mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Enable WAL mode for the DB
This commit is contained in:
parent
6c3fe894b5
commit
2d2b2e5873
1 changed files with 22 additions and 0 deletions
|
@ -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")
|
Loading…
Reference in a new issue