"""User notification preferences (agent-11 PR3)

Revision ID: 0037
Revises: 0036
Create Date: 2026-06-23

users.notification_prefs JSONB (opt-out je Benachrichtigungstyp; '{}' = alle an).
"""
from alembic import op

revision = "0037"
down_revision = "0036"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.execute(
        "ALTER TABLE users ADD COLUMN IF NOT EXISTS notification_prefs JSONB NOT NULL DEFAULT '{}'"
    )


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