ALTER TABLE contact_discovered_profiles
    ADD COLUMN IF NOT EXISTS ignored_at TIMESTAMPTZ,
    ADD COLUMN IF NOT EXISTS blocked_at TIMESTAMPTZ,
    ADD COLUMN IF NOT EXISTS user_blocked BOOLEAN NOT NULL DEFAULT false;

CREATE INDEX IF NOT EXISTS idx_contact_discovered_profiles_person_group
    ON contact_discovered_profiles(user_id, person_group_id)
    WHERE person_group_id IS NOT NULL;
