Spaces:
Runtime error
Runtime error
Commit History
-
feat(catalogues/pricing): standardize pricing level keys to lowercase format
- Update pricing levels from uppercase (NCNF, CNF, Distributor, Salon) to lowercase (ncnf, cnf, distributor, retail) - Standardize inventory levels keys to match pricing level naming convention - Update catalogue models to reflect consistent lowercase key structure across all pricing and inventory tiers - Modify schemas and services in catalogues, merchants, taxonomy, and trade_sales modules - Update sync handlers and catalogue service to process lowercase pricing level keys - Standardize warehouse models and schemas for consistent data structure - Update all documentation, examples, and migration scripts to reflect new naming convention - Ensure backward compatibility through updated sync and service layer logic - This change improves API consistency and aligns with REST API best practices for key namingb3b8847
-
refactor(database): reorganize database scripts and examples into docs directory
feat(database): add migration scripts for pricing levels, inventory and PO optional fields docs(examples): add example scripts for verification, diagnostics and imports style(database): update SQL and Python scripts with consistent formatting chore: move existing scripts to docs directory for better organizationf24ee1d
-
refactor(database): consolidate shared database base and fix foreign key schema references
- Create centralized `app/core/database.py` with shared SQLAlchemy Base instance - Update all model files to use shared Base instead of individual instances - Fix foreign key references to include schema prefix (`trans.`) across all models: * Trade sales: order_id, shipment_id, po_item_id references * Inventory stock: ledger_id, adjustment_id references * Purchase orders: po_id references * Purchase receipts: po_id, grn_id, po_item_id, grn_item_id references - Update `app/sql.py` to import shared Base and register all models - Add comprehensive documentation for foreign key fixes and schema migration - Add migration scripts for pricing levels column and catalogue reference table - Add test suite for pricing levels sync and complete pricing flow validation - Reorganize documentation structure with implementation summaries and security guides - Resolves foreign key resolution errors caused by multiple Base instances and missing schema prefixescd357c6