-- Migration: Online Session — host/admin start window
-- Description: Adds one admin-configurable column to hdb_online_session:
--                host_start_opens_minutes_before — minutes before the session
--                                                  start that the host/admin can
--                                                  start the session. Store-only:
--                                                  the frontend uses it to enable
--                                                  the "Start" action from that time.
--              Nullable; existing rows keep no early-start window (NULL).
-- Idempotent — safe to re-run.

ALTER TABLE hdb_online_session
  ADD COLUMN IF NOT EXISTS host_start_opens_minutes_before SMALLINT NULL;

COMMENT ON COLUMN hdb_online_session.host_start_opens_minutes_before IS
  'Minutes before session start that the host/admin can start the session. Store-only; the frontend enables the Start action from that time. NULL → no early-start window.';
