-- Webhook integration: add token hash column for fast public-endpoint lookup
-- The actual token lives in the encrypted credentials column; this hash is
-- used only for O(1) lookup on the unauthenticated /api/webhook/:token route.

ALTER TABLE integrations
  ADD COLUMN webhook_token_hash VARCHAR(64) NULL UNIQUE AFTER config,
  ADD INDEX idx_webhook_token (webhook_token_hash);
