fix(chunter): skip legacy comment migration when domain is absent#10891
Open
ignatremizov wants to merge 1 commit into
Open
fix(chunter): skip legacy comment migration when domain is absent#10891ignatremizov wants to merge 1 commit into
ignatremizov wants to merge 1 commit into
Conversation
Allow old Chunter migrations to complete cleanly for workspaces that no longer have the legacy `comment` storage domain. The migration still runs normally when the domain exists, but workspaces created or restored after the comment-to-activity migration can now skip the obsolete table operations and record the migration state. Changes: - Add a migration-client `domainExists` helper backed by the active adapter. - 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 including translated table names. - Guard legacy `comment` update/move/delete operations in the Chunter migration. Validation: - 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 Signed-off-by: Ignat Remizov <ignat@ignatremizov.com>
|
Connected to Huly®: UBERF-16481 |
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.
fix(chunter): skip legacy comment migration when domain is absent
Summary
Some workspaces no longer have the legacy
commentstorage 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
commenttable, and newer/restored workspaces skip the obsolete work cleanly.Changes
domainExists()to the migration client.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-chunterNotes
node common/scripts/install-run-rush.js installbefore the targeted build; the first build attempt failed with Rush'sLink flag invalidsetup error before compiling.