ALTER TABLE sessions
    ADD COLUMN notification_mode VARCHAR(50) NOT NULL DEFAULT 'GroupAndDirect'
        CHECK (notification_mode IN ('GroupAndDirect', 'GroupOnly')),
    ADD COLUMN one_hour_reminder_processed_at TIMESTAMPTZ;

CREATE INDEX ix_sessions_one_hour_reminders ON sessions (scheduled_at)
    WHERE status IN ('Confirmed', 'ConfirmationSent')
      AND one_hour_reminder_processed_at IS NULL;
