- Migration 20260834000000: events.use_realtime_clock (boolean, default false) - Admin: Real-time clock toggle in the Events create/edit modal - Convivo: useEvent picks new Date() vs simulated DEFAULT_NOW from the flag; Home shows a 'Demo clock' badge only in simulated mode - Docs: app-structure, admin-app, schema, next-steps
20 lines
1023 B
SQL
20 lines
1023 B
SQL
-- =============================================================================
|
|
-- Convivo — Per-event real-time clock toggle
|
|
--
|
|
-- Adds `events.use_realtime_clock` (boolean, default false). When false (the
|
|
-- default), the Convivo app uses its simulated mid-event clock so the demo
|
|
-- always looks "live" regardless of the real date. When true, the app uses the
|
|
-- real system clock (`new Date()`), so slot status reflects the actual time.
|
|
--
|
|
-- The admin toggles this per event in the Events view; the Convivo app reads it
|
|
-- from the active event and picks the clock accordingly.
|
|
-- =============================================================================
|
|
|
|
alter table public.events
|
|
add column if not exists use_realtime_clock boolean not null default false;
|
|
|
|
comment on column public.events.use_realtime_clock is
|
|
'When true, the Convivo app drives slot status (Live/Next/Done) from the real '
|
|
'system clock; when false (default) it uses the simulated mid-event clock so '
|
|
'the demo always looks live.';
|