Agency can choose a scheduled calendar post to prefill title, copy, pillar and date, or create/edit one in the calendar while adding it to the pipeline. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
545 B
SQL
13 lines
545 B
SQL
-- Link pipeline creatives to RRSS calendar pieces (documents content.pieces[].id).
|
|
-- Idempotent.
|
|
|
|
alter table public.creative_pipeline
|
|
add column if not exists calendar_piece_id text;
|
|
|
|
create index if not exists creative_pipeline_calendar_piece_idx
|
|
on public.creative_pipeline (tenant_id, calendar_piece_id)
|
|
where calendar_piece_id is not null;
|
|
|
|
comment on column public.creative_pipeline.calendar_piece_id is
|
|
'Stable id of the RRSS calendar piece (documents type=calendar → pieces[].id). Agency links pipeline ↔ editorial plan.';
|