Commit Graph

2 Commits

Author SHA1 Message Date
Adrian Flores Cortes
2b69098fd4 [EPIC-001-FK-DEBILES] feat(ddl): Add conditional FK constraints to fix weak references
Add 19 conditional FK constraints to 4 schema files:
- 06-inventory-ext: 7 FKs (warehouses, products, uom, stock_moves)
- 07-purchase-ext: 5 FKs (purchase_orders, partners, products)
- 03-hse: 3 FKs (almacen_temporal for EPP)
- 10-documents: 4 FKs (documents, users)

Features:
- Constraints are conditional (only created if target tables exist)
- Idempotent (can be re-run without errors)
- Added 6 new indexes for FK fields

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:00:23 -06:00
bf97e26cdf Migración desde erp-construccion/database - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:21 -06:00