-- 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);
