template-saas-database-v2/ddl
Adrian Flores Cortes fa67494ec7 feat(ddl): Add FK indexes for 32 missing foreign keys
Creates 99-additional-fk-indexes.sql with indexes for all FKs
that were identified without dedicated index coverage.

Organized by priority:
- HIGH: billing (3), notifications (1), sales (2), commissions (1)
- MEDIUM: audit (2), storage (1), webhooks (1), whatsapp (1)
- LOW: created_by/approved_by fields across multiple schemas

References: TASK-2026-02-03-REMEDIACION-BD (P1)
Based on: INFORME-INTEGRIDAD-REFERENCIAL.md analysis

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:18:51 -06:00
..
schemas fix(ddl): Add storage triggers and fix whatsapp RLS pattern 2026-02-03 17:18:07 -06:00
00-extensions.sql Initial commit - Database de template-saas migrado desde monorepo 2026-01-16 08:07:11 -06:00
01-schemas.sql Initial commit - Database de template-saas migrado desde monorepo 2026-01-16 08:07:11 -06:00
02-enums.sql [SAAS-018] feat: Add sales schema DDL 2026-01-24 20:49:35 -06:00
03-functions.sql [CRIT-002] feat(ddl): Add public.set_updated_at() function 2026-02-03 17:17:16 -06:00
99-additional-fk-indexes.sql feat(ddl): Add FK indexes for 32 missing foreign keys 2026-02-03 17:18:51 -06:00