Skip to content

Migrate from record node UUID to internal ID#119

Open
SteRiccio wants to merge 16 commits intomasterfrom
feat/node-iid
Open

Migrate from record node UUID to internal ID#119
SteRiccio wants to merge 16 commits intomasterfrom
feat/node-iid

Conversation

@SteRiccio
Copy link
Member

No description provided.

Copy link

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 implements a significant database schema change to migrate the node table from using UUID-based identification to internal integer IDs (i_id) scoped within each record. The migration adds new columns i_id and p_i_id to the node table, transforms existing data, updates the activity_log entries to use the new ID scheme, recreates the activity_log_user_aggregate view, and changes the primary key from uuid to a composite key of (record_uuid, i_id).

Changes:

  • Add i_id (internal ID) and p_i_id (parent internal ID) columns to the node table
  • Migrate meta.h UUID arrays to i_id arrays and update activity_log content structure
  • Replace the node table's primary key from uuid to composite (record_uuid, i_id)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
src/db/dbMigrator/migration/survey/migrations/sqls/20260217085512-alter-table-node-add-iid-up.sql Core migration logic that adds new columns, populates data, updates activity_log, recreates views, and changes primary key
src/db/dbMigrator/migration/survey/migrations/sqls/20260217085512-alter-table-node-add-iid-down.sql Down migration file (currently empty with placeholder)
src/db/dbMigrator/migration/survey/migrations/20260217085512-alter-table-node-add-iid.js JavaScript migration wrapper that loads and executes SQL files

💡 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