Skip to content

Migrate from node UUID to node internal ID (WIP)#4121

Draft
SteRiccio wants to merge 23 commits intomasterfrom
refactor/node-iid
Draft

Migrate from node UUID to node internal ID (WIP)#4121
SteRiccio wants to merge 23 commits intomasterfrom
refactor/node-iid

Conversation

@SteRiccio
Copy link
Member

@SteRiccio SteRiccio commented Feb 16, 2026

  • DB migrations
    • record nodes
    • record validation
    • record files
    • activity log

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-core package 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.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants