feat(wms): persistencia de containers en warehouse-postgres + UoW (Inc 4 flota)#415
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #414 · Incremento 4 del EPIC #409 (pre-paso para cargar palets). Baja la persistencia del agregado
Container(palet/caja/lote) al paquetewarehouse-postgres, sobrescope_idopaco — hasta ahora su adaptador solo existía en ResponseGrid, así que el WMS standalone no podía persistir palets.Qué incluye
wms_0003_containers.sql(runner del paquete):wms.containers(self-FKparent_container_idON DELETE SET NULL,linesjsonb,gross_weight/volumedouble precision, holder polimórfico sin FK, único(scope_id, code)) +wms.container_code_sequences(PK(scope_id, type)). Idempotente.DrizzleContainerRepositoryimplementando el port:save(upsert por id, respeta inmutables),findById,findByScope(filtros type/status/holder/topLevelOnly),findChildren(árbol),nextSequence(upsert atómicoON CONFLICT DO UPDATE SET last_value = last_value + 1 RETURNING— códigos monotónicos, sin colisión concurrente). Tipado sobreWmsDatabasepara entrar en el UoW.containersañadido aWmsUnitOfWork/runInWmsTransaction→ un palet y su stock se persisten en la misma transacción (caso de atomicidad + rollback en el consumidor de validación).Verificación (local, SIN Postgres — Docker no arranca en esta sesión)
core build + 186 tests · warehouse-postgres build (typecheck 0) · api build + clean typecheck 0 errores · prettier packages · api-client + web · lockfile — todo verde. Los int-tests del paquete (round-trip, árbol, nextSequence, atomicidad) NO se corrieron en local por falta de BD — los valida el job Test de CI (Postgres propio), igual que la suite Jest del api. Repo + migración revisados a fondo por inspección.