Files
supply-intelligence/migrations/0005_package_event_account_id.sql
2026-05-12 18:49:52 +08:00

9 lines
384 B
SQL

-- Migration 0005: add account_id to package_change_events
-- Each package change event is produced by a specific account/platform detection.
ALTER TABLE supply_intelligence_package_change_events
ADD COLUMN IF NOT EXISTS account_id BIGINT NOT NULL DEFAULT 1;
CREATE INDEX IF NOT EXISTS idx_package_events_account_id
ON supply_intelligence_package_change_events(account_id);