feat(performance): 네이버 광고 보고서 업로드(ROAS·보고서 항목) + 머리글 클릭 일자별 상세

- 네이버 업로드: 3열 기간·4열 총비용(광고비)·12열 구매완료 광고수익률(ROAS), 나머지 항목은 metrics(JSONB)
- 네이버·구글·메타 칸 ROAS = 보고서 값(여러 날은 광고비 가중 평균), 쇼핑몰 매출로 계산하지 않음
- 네이버 머리글 클릭 → 지금 기간 일자별 보고서 표 + 합계(GET /api/ad-spend/naver/details)
- performance_db 마이그레이션 006: perf_ad_spend.roas·metrics

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 17:23:11 +09:00
parent 240d61c903
commit e9fb1c3407
15 changed files with 525 additions and 46 deletions
+14
View File
@@ -197,6 +197,20 @@ docker exec postgres-db psql -U postgres -d performance_db -c "\d perf_ad_spend"
되돌리기(광고비 데이터만 사라짐): `docker exec postgres-db psql -U postgres -d performance_db -c "DROP TABLE perf_ad_spend;"`
## 실적 광고비 ROAS·보고서 항목 마이그레이션 (performance_db 006)
006은 `perf_ad_spend` 에 `roas`·`metrics` 열 두 개만 더한다(기존 값 그대로, 다시 실행 가능). 005 다음에 적용한다.
미적용이면 네이버 보고서 업로드·네이버 일자별 상세만 503 안내, 나머지 광고비 화면은 그대로.
```bash
cd /opt/www/main
docker exec postgres-db pg_dump -U postgres performance_db > ~/performance_db_before_006_$(date +%Y%m%d%H%M).sql
docker exec -i postgres-db psql -v ON_ERROR_STOP=1 -U postgres -d performance_db < scripts/sql/performance_db_006_ad_roas_metrics.sql
docker exec postgres-db psql -U postgres -d performance_db -c "\d perf_ad_spend"
```
되돌리기(보고서 ROAS·상세만 사라짐): `docker exec postgres-db psql -U postgres -d performance_db -c "ALTER TABLE perf_ad_spend DROP COLUMN metrics, DROP COLUMN roas;"`
## 회의록 작업 등록 표 — 작업 칸 마이그레이션 (026)
026은 `goal_meeting_tasks.parent_task_id` 열만 추가한다(기존 값 그대로, 다시 실행 가능). 025 뒤에 적용한다. 미적용이면 작업 칸을 고를 때만 503 안내.