Files
warmbly/internal/infrastructure/db/migrations/000019_sequence_branching.up.sql
T
Matthew Meszaros 2a2e248ad9 feat: add campaign sequence branching backend
Store per-step branching conditions, validate branch targets, and select campaign contact steps by following the flow graph. Preserve linear progression for steps without branch conditions.
2026-06-05 06:02:55 +02:00

7 lines
458 B
SQL

-- Per-step conditional branching. A sequence step can carry a branching tree
-- that routes a contact to a target step (or stops them) based on whether they
-- opened/clicked/replied within N days. Kept as a single jsonb tree on the
-- step itself — no extra tables. An empty object ('{}') / empty branches list
-- means the step keeps the default linear progression.
ALTER TABLE sequences ADD COLUMN IF NOT EXISTS conditions jsonb NOT NULL DEFAULT '{}';