Files
acmcc/supabase/migrations/20260428003341_380015d8-945b-4738-a26e-4347e082e4cc.sql
T
2026-06-01 20:19:26 -04:00

9 lines
423 B
SQL

ALTER TABLE public.association_fee_rules
ADD COLUMN IF NOT EXISTS billing_start_date date,
ADD COLUMN IF NOT EXISTS auto_post_enabled boolean NOT NULL DEFAULT false,
ADD COLUMN IF NOT EXISTS next_run_date date,
ADD COLUMN IF NOT EXISTS last_run_date date;
CREATE INDEX IF NOT EXISTS idx_assoc_fee_rules_next_run
ON public.association_fee_rules (auto_post_enabled, next_run_date)
WHERE auto_post_enabled = true;