ALTER TABLE calendar_events
    ADD COLUMN report_id BIGINT REFERENCES reports (id) ON DELETE CASCADE,
    ADD COLUMN kind VARCHAR(32) NOT NULL DEFAULT 'standalone';

CREATE UNIQUE INDEX idx_calendar_events_report_summary ON calendar_events (report_id)
    WHERE report_id IS NOT NULL;
