Link pipeline creatives to RRSS calendar pieces with pick-or-create UI.
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>
This commit is contained in:
12
sql/creative_pipeline_calendar_link.sql
Normal file
12
sql/creative_pipeline_calendar_link.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- 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.';
|
||||
Reference in New Issue
Block a user