"""phase24 — enable issue_created notifications for admin and director by default Sets enabled=True for ('issue_created', 'admin') and ('issue_created', 'director') in the notification_matrix table if those rows already exist (created when an admin previously saved the matrix page). Rows that do not exist are left alone — the updated MATRIX_DEFAULTS in notification_matrix.py covers those at runtime. """ from alembic import op revision = 'phase24_notify_defaults' down_revision = 'phase23_support_tickets' branch_labels = None depends_on = None def upgrade(): op.execute(""" UPDATE notification_matrix SET enabled = 1 WHERE event_type = 'issue_created' AND role_key IN ('admin', 'director') """) def downgrade(): op.execute(""" UPDATE notification_matrix SET enabled = 0 WHERE event_type = 'issue_created' AND role_key IN ('admin', 'director') """)