platform
platform copied to clipboard
fix(chunter): skip legacy comment migration when domain is absent
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
commentupdate/move/delete operations with the domain existence check.
Testing
git diff --cached --checknode 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 installbefore the targeted build; the first build attempt failed with Rush'sLink flag invalidsetup error before compiling.
Connected to Huly®: UBERF-16481