BEGIN;

ALTER TABLE events
ADD COLUMN IF NOT EXISTS is_default_experience BOOLEAN NOT NULL DEFAULT false;

ALTER TABLE events
ADD COLUMN IF NOT EXISTS show_in_event_list BOOLEAN NOT NULL DEFAULT true;

CREATE INDEX IF NOT EXISTS events_is_default_experience_idx
ON events(is_default_experience);

CREATE INDEX IF NOT EXISTS events_show_in_event_list_idx
ON events(show_in_event_list);

UPDATE events
SET
  is_default_experience = true,
  show_in_event_list = true
WHERE event_public_id = 'evt_demo_001';

UPDATE events
SET
  is_default_experience = false,
  show_in_event_list = true
WHERE event_public_id IN (
  'evt_demo_score_o_001',
  'evt_demo_variant_manual_001'
);

COMMIT;
