chore: Add migration table for HANA migration#268
Open
stefanrudi wants to merge 35 commits intomainfrom
Open
Conversation
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.
Add HANA Migration Support for Change Tracking Plugin v1 to v2
New Feature
✨ Introduces HANA migration infrastructure and tooling to support upgrading the
@cap-js/change-trackingplugin from v1 to v2. This includes a stored procedure generator, a CLI tool to restore composition backlinks, and a comprehensive migration guide.Changes
bin/restore-backlinks.js: New CLI script (changelog-restore-backlinks) that compiles the CDS model, detects composition relationships, and generates aSAP_CHANGELOG_RESTORE_BACKLINKS.hdbprocedurefile indb/src/to restore missing parent backlinks for existing change data.lib/hana/procedure.js: New module that generates the HANA stored procedure SQL. The procedure finds orphaned change entries for composition child entities, resolves parent entity keys via FK lookup, creates missing parent composition entries (valueDataType='cds.Composition'), and links child entries back viaparent_ID. Handles both v1 migrated (single-key) and v2 composite-key formats.migration-plan.md: New step-by-step migration guide covering the full v1→v2 migration flow:createdAt/createdByfromChangeLogtoChangesvia SQL merge.hdbmigrationtablewith column renames, resizes, and dropspackage.json: Registerschangelog-restore-backlinksas a binary entry point and addsbinto the published files list.index-old.cds: Added snapshot of the v1 CDS schema for reference during migration.changelog-v1.csv: Sample v1 data for testing the migration flow.tests/bookshop/db/incidents/schema.cds: Minor test schema adjustments — addedIDtostatuschangelog annotation, removed@changelog: falseondecimalProp, and removed an inlinedescrcomposition of one.📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!
PR Bot Information
Version:
1.18.11| 📖 Documentation | 🚨 Create Incident | 💬 Feedbackanthropic--claude-4.6-sonnetpull_request.openedf0275630-237d-11f1-88c1-05cf329adb95