From 20f3e0ca2cf2af998ec02bc723940fbd2cd42a07 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Wed, 22 Jul 2026 08:35:23 -0500 Subject: [PATCH] feat(scheduled_actions): add nullable IANA timezone column (chat#1881 3c) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds scheduled_actions.timezone (text, default NULL; NULL = UTC) so the weekly report can be scheduled at 9am LOCAL time instead of 9am UTC. Additive, nullable, backwards-compatible — existing rows keep UTC behavior. Prerequisite for the api-side timezone wiring (api#780 ships the DST-aware time-derivation core). Co-Authored-By: Claude Opus 4.8 (1M context) --- ...0260722000000_add_timezone_to_scheduled_actions.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 supabase/migrations/20260722000000_add_timezone_to_scheduled_actions.sql diff --git a/supabase/migrations/20260722000000_add_timezone_to_scheduled_actions.sql b/supabase/migrations/20260722000000_add_timezone_to_scheduled_actions.sql new file mode 100644 index 0000000..62326a9 --- /dev/null +++ b/supabase/migrations/20260722000000_add_timezone_to_scheduled_actions.sql @@ -0,0 +1,10 @@ +-- Add timezone column to scheduled_actions +-- Purpose: schedule weekly-report sends at 9am LOCAL time instead of 9am UTC +-- (currently the middle of the night in the US). See chat#1881 item 3c. + +-- Change: add optional IANA timezone column with default NULL (NULL = UTC). +ALTER TABLE public.scheduled_actions +ADD COLUMN IF NOT EXISTS timezone text DEFAULT NULL; + +COMMENT ON COLUMN public.scheduled_actions.timezone IS +'IANA timezone id (e.g. America/New_York) the schedule is interpreted in. NULL = UTC.';