platform icon indicating copy to clipboard operation
platform copied to clipboard

fix(chunter): skip legacy comment migration when domain is absent

Open ignatremizov opened this issue 6 months ago • 1 comments

fix(chunter): skip legacy comment migration when domain is absent

Summary

Some workspaces no longer have the legacy comment storage domain, but the old Chunter migration still tries to update and move rows from it. The upgrade continues after logging the SQL error, but the migration state is not recorded, so the same missing-table operation can be retried on later upgrade passes.

This change lets migration code check whether a domain exists before running legacy table-specific cleanup. The Chunter comment migration still runs for older workspaces that have the comment table, and newer/restored workspaces skip the obsolete work cleanly.

Changes

  • Add domainExists() to the migration client.
  • Implement the migration domain check through the active storage adapter helper.
  • Make the Postgres domain helper check actual public tables instead of assuming every domain exists.
  • Keep Postgres domain listing compatible with model domain names while also reflecting actual tables.
  • Guard Chunter's legacy comment update/move/delete operations with the domain existence check.

Testing

  • git diff --cached --check
  • node common/scripts/install-run-rush.js build -t @hcengineering/model -t @hcengineering/server-tool -t @hcengineering/postgres -t @hcengineering/model-chunter

Notes

  • A fresh worktree required node common/scripts/install-run-rush.js install before the targeted build; the first build attempt failed with Rush's Link flag invalid setup error before compiling.

ignatremizov avatar May 25 '26 21:05 ignatremizov

Connected to Huly®: UBERF-16481

huly-github-staging avatar May 25 '26 21:05 huly-github-staging