Files
security-alert-center/backend/alembic/versions/005_notification_webhook.py
T
PTah 20fa7e2c27 feat: webhook notification channel with UI and ingest dispatch
Add webhook config (DB/env), JSON POST on events/problems, settings API,
Settings UI section, and notify_dispatch for multi-channel ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:09:40 +10:00

31 lines
903 B
Python

"""notification_channels: webhook columns
Revision ID: 005
Revises: 004
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
revision: str = "005"
down_revision: Union[str, None] = "004"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column("notification_channels", sa.Column("webhook_url", sa.Text(), nullable=True))
op.add_column(
"notification_channels",
sa.Column("webhook_secret_header", sa.String(length=64), nullable=True),
)
op.add_column("notification_channels", sa.Column("webhook_secret", sa.Text(), nullable=True))
def downgrade() -> None:
op.drop_column("notification_channels", "webhook_secret")
op.drop_column("notification_channels", "webhook_secret_header")
op.drop_column("notification_channels", "webhook_url")