Migrate from node UUID to node internal ID (WIP)#4121
Draft
Migrate from node UUID to node internal ID (WIP)#4121
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request is a work-in-progress (WIP) migration from using node UUIDs to node internal IDs (IIds) as the primary identifier for nodes in the Arena survey platform. The migration affects multiple layers of the application including the database schema, server-side repositories and managers, frontend state management, and test files.
Changes:
- Added local dependency on
@openforis/arena-corepackage containing shared utilities for the migration - Updated database schema to use internal IDs (
i_id,p_i_id) alongside UUIDs for node identification - Modified server-side repositories, managers, and APIs to work with internal IDs
- Updated frontend state management and components to use internal IDs
- Modified test utilities and integration tests to support the new identifier system
Reviewed changes
Copilot reviewed 59 out of 61 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Added local dependency for @openforis/arena-core package |
| package.json | Added local arena-core dependency |
| core/objectUtils.js | Added getIId, getParentInternalId, and toIIdIndexedObj utility functions |
| core/record/node.js | Added iId and pIId keys and corresponding getter functions |
| core/record/nodeKeys.js | Changed nodeUuid key to nodeIId |
| core/record/record.js | Exported getNodeByInternalId alongside getNodeByUuid |
| core/record/_record/recordReader.js | Updated to import and export getNodeByInternalId |
| core/record/_record/recordUpdater.js | Updated documentation formatting |
| core/record/_record/recordsCombiner.js | Migrated functions to use IId instead of UUID for node lookups |
| core/record/_record/recordNodesUpdater.js | Updated parameter names from nodeUuids to nodeIIds |
| core/record/recordFile.js | Changed nodeUuid property to nodeIId |
| core/record/recordValidationReportItem.js | Updated to use nodeIId key |
| common/objectUtils.js | Added iId and pIId keys |
| common/activityLog/activityLog.js | Added nodeIId content key |
| common/model/db/tables/table.js | Added iId to common column set |
| common/model/db/tables/dataNodeDef/table.js | Updated table schema to use i_id, p_i_id columns and composite primary keys |
| common/model/db/tables/dataNodeDef/dataColProps.js | Updated entity value processor to return IId |
| server/modules/surveyRdb/schemaRdb/*.js | Updated RDB view schemas to use nodeIId |
| server/modules/surveyRdb/repository/*.js | Updated RDB repository queries to use internal IDs |
| server/modules/surveyRdb/service/*.js | Updated uniqueness validation to use IId |
| server/modules/record/repository/nodeRepository.js | Updated CRUD operations to use i_id column and internal IDs |
| server/modules/record/manager/*.js | Updated record managers to use internal IDs |
| server/modules/record/api/recordApi.js | Updated DELETE endpoint to accept nodeIId parameter |
| server/modules/record/service/recordService.js | Updated service methods to use nodeIId |
| server/modules/survey/service/recordCheckJob.js | Updated to index nodes by IId |
| server/modules/mobile/service/*.js | Updated mobile import to use IId in logging |
| server/modules/dataImport/service/*.js | Updated data import jobs to use IId tracking |
| server/modules/collectImport/service/*.js | Updated Collect import to use nodeIId |
| webapp/store/ui/surveyForm/*.js | Updated form state and actions to use IId |
| webapp/store/ui/record/hooks/index.js | Updated hooks to use IId |
| webapp/store/ui/record/actions/*.js | Updated record actions to use IId |
| webapp/components/survey/SurveyForm/nodeDefs/components/*.js | Updated components to use IId for keys and node selection |
| webapp/service/api/data/index.js | Updated file URL generation to use IId |
| test/utils/*.js | Updated test utilities to use IId |
| test/integration/tests/*.js | Updated integration tests to use IId |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/modules/record/manager/_recordManager/nodeCreationManager.js
Outdated
Show resolved
Hide resolved
server/modules/record/manager/_recordManager/nodeUpdateManager.js
Outdated
Show resolved
Hide resolved
|
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.



Uh oh!
There was an error while loading. Please reload this page.