feat: sync Meta metrics, objetivos ppto/consecución y simulador por tenant
Rellena ad_daily desde Meta, KPIs con fallback a daily, objetivos de presupuesto vs consecución, y simulador sin TikTok anclado a métricas del cliente. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
13
sql/targets_budget.sql
Normal file
13
sql/targets_budget.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- 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)';
|
||||
Reference in New Issue
Block a user