]>
gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commit
feat(ERP-33): add stock history ETL — migration, model, service, command
- migration: partitioned table stock_history, уникальный индекс ON CONFLICT
- records/StockHistory: ActiveRecord модель
- services/StockHistoryService: ETL с advisory lock, batch INSERT 1000, DQ assertions (DQ-1..6), Telegram alerts
- services/CollectResult, DqResult: DTO
- commands/StockHistoryController: actionCollect, actionCreatePartition, actionDropOldPartitions
Crontab (в комментарии контроллера):
0 8,20 * * * php yii stock-history/collect
0 1 1 * * php yii stock-history/create-partition
0 2 1 * * php yii stock-history/drop-old-partitions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>