-- Notification list cursors are per account, per enabled generation. -- A checkpoint and its events are committed in the same transaction. ALTER TABLE creator_account_listener ADD COLUMN notice_checkpoints jsonb NOT NULL DEFAULT '{}'::jsonb, ADD COLUMN last_poll_at timestamptz, ADD CONSTRAINT creator_listener_checkpoint_object CHECK (jsonb_typeof(notice_checkpoints) = 'object'); -- A boundary established by the removed push adapter cannot seed list polling. UPDATE creator_account_listener SET boundary_at = NULL, last_delivery_id = '', status = CASE WHEN enabled THEN 'starting' ELSE 'stopped' END, reason = '', updated_at = now();