Files
4ventures-client-portal/sql/targets_budget.sql
4Ventures 965a58540e Ship monthly goals, calendar creative zoom, and legal pages.
Editable targets vs actual, pipeline review-only with client reject notes, and published pieces opening from the calendar day.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 15:17:15 +02:00

17 lines
544 B
SQL

-- Monthly objectives: budget (ppto) + consecution targets
-- Idempotent.
alter table public.targets
add column if not exists spend_target numeric;
alter table public.targets
add column if not exists spend_actual numeric;
comment on column public.targets.spend_target is
'Presupuesto ads objetivo del mes (ppto)';
comment on column public.targets.spend_actual is
'Gasto ads real del mes (opcional; si null se calcula de ad_daily)';
create unique index if not exists targets_tenant_month_uidx
on public.targets (tenant_id, month);