Files
siftlode/backend/alembic/versions/0006_app_state.py
T
peter b1832afd18 style: apply ruff format across backend + scripts (line-length 100)
Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in
.git-blame-ignore-revs (next commit) so git blame skips it.
2026-08-23 07:43:06 +02:00

30 lines
760 B
Python

"""app_state (admin-controlled global flags)
Revision ID: 0006_app_state
Revises: 0005_shorts_probed
Create Date: 2026-06-11
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
revision: str = "0006_app_state"
down_revision: Union[str, None] = "0005_shorts_probed"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.create_table(
"app_state",
sa.Column("id", sa.Integer(), primary_key=True),
sa.Column("sync_paused", sa.Boolean(), nullable=False, server_default="false"),
)
op.execute("INSERT INTO app_state (id, sync_paused) VALUES (1, false)")
def downgrade() -> None:
op.drop_table("app_state")