BEGIN;

ALTER TABLE events
ADD COLUMN current_presentation_id UUID REFERENCES event_presentations(id) ON DELETE SET NULL,
ADD COLUMN current_content_bundle_id UUID REFERENCES content_bundles(id) ON DELETE SET NULL,
ADD COLUMN current_runtime_binding_id UUID REFERENCES map_runtime_bindings(id) ON DELETE SET NULL;

CREATE INDEX events_current_presentation_id_idx ON events(current_presentation_id);
CREATE INDEX events_current_content_bundle_id_idx ON events(current_content_bundle_id);
CREATE INDEX events_current_runtime_binding_id_idx ON events(current_runtime_binding_id);

COMMIT;
