"""Add session_version to users for session invalidation on credential change."""

from alembic import op

revision = "0024"
down_revision = "0023"


def upgrade() -> None:
    op.execute(
        "ALTER TABLE users ADD COLUMN IF NOT EXISTS session_version INTEGER NOT NULL DEFAULT 1"
    )


def downgrade() -> None:
    op.execute("ALTER TABLE users DROP COLUMN IF EXISTS session_version")
