feat(migration): durable batch import engine foundation (TEL-67) - #297
Merged
Conversation
Introduce migration jobs API with BullMQ step processing, checkpoint resume, per-row results, and migration_legacy_id_map for legacy PMS id resolution. - New migration module: create/poll/resume jobs via /api/v1/migration/* - BullMQ queue haip-migration-steps with retry/backoff (webhook pattern) - Schema: migration_jobs, migration_row_results, migration_legacy_id_map - Import registry: physical rooms + open-folio-balance (adjustment posting) - Reservation import: legacy guest/room-type/rate-plan refs, dryRun, dedupe Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
telivity-otaip
marked this pull request as ready for review
August 11, 2026 00:57
…ep processor Persist checkpoint on legacy-id skip path via shared helper, and use bracket notation for row['legacyId'] index-signature access. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Combine migration job engine (TEL-67) with main's encrypted source credential vault. Merge migration module/controller/schema exports; renumber engine SQL migration to 0020 to avoid 0019 clash. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Release smoke failed because MigrationStepProcessorService could not resolve ReservationImportService when bootstrapping AppModule. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
CI Test job failed sync-test-count --check (1474/209 vs 1490/212). Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
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.
Summary
Implements the migration engine foundation for hands-off PMS migration (Linear TEL-67).
/api/v1/migration/jobs): create async import jobs, poll status with per-row results, resume from checkpoint after failurehaip-migration-stepson Redis — retries with exponential backoff, DB status rows (mirrors webhook delivery pattern)migration_legacy_id_map— mapsproject_id + entity + legacy_id → haip uuidfor cross-step referencesrooms(physical rooms) andopen-folio-balances(single adjustment posting, not historical replay)dryRun, and idempotent dedupe via legacy id map +externalConfirmation + channelCodeAPI
/api/v1/migration/jobs?propertyId=/api/v1/migration/jobs/:id?propertyId=/api/v1/migration/jobs/:id/resume?propertyId=Supported entities:
guests,room-types,rate-plans,rooms,open-folio-balances,reservations.Testing
pnpm db:migratecreates new tables idempotently via push-schemaMulti-tenancy
All routes require
propertyIdquery param; all DB queries are property-scoped per CLAUDE.md.Linear Issue: TEL-67