michangarrito/database/schemas
rckrdmrd 5a49ad0185 [INTEGRATION] feat: Integrate template-saas scopes and database objects
## Documentation
- Align MCH-029 to MCH-032 with template-saas modules (SAAS-008 to SAAS-015)
- Create MCH-034 (Analytics) and MCH-035 (Reports) from SAAS-016/017
- Update PLAN-DESARROLLO.md with Phase 7 and 8
- Update _MAP.md indexes (35 total epics)

## Database (5 new schemas, 14 tables)
- Add storage schema: buckets, files, signed_urls
- Add webhooks schema: endpoints, deliveries
- Add audit schema: logs, retention_policies
- Add features schema: flags, tenant_flags (14 seeds)
- Add analytics schema: metrics, events, reports, report_schedules
- Add auth.oauth_connections for MCH-030
- Add timestamptz_to_date() IMMUTABLE function
- Update EXPECTED_SCHEMAS in recreate-database.sh

## Analysis Reports
- ANALISIS-INTEGRACION-TEMPLATE-SAAS-2026-01-13.md
- VALIDACION-COHERENCIA-2026-01-13.md
- GAP-ANALYSIS-BD-2026-01-13.md
- REPORTE-EJECUCION-2026-01-13.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 07:10:55 -06:00
..
00-extensions.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
01-schemas.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
02-functions.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
03-public.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
04-auth.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
05-catalog.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
06-sales.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
07-inventory.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
08-customers.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
09-orders.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
10-subscriptions.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
11-messaging.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
12-integrations.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
13-referrals.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
14-codi-spei.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
15-invoices.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
16-marketplace.sql [MIGRATION-V2] feat: Migrar michangarrito a estructura v2 2026-01-10 11:28:54 -06:00
17-storage.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
18-webhooks.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
19-audit.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
20-features.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00
21-analytics.sql [INTEGRATION] feat: Integrate template-saas scopes and database objects 2026-01-13 07:10:55 -06:00