feat(sql-editor): data migrate from side-by-side compare (≤500 ops) - #188
Merged
Conversation
Key-based insert/update/delete with checkboxes, optional identity IDs, progress panel, destination snapshot, and data_migrate_runs history. Over 500 ops toasts Server Beam instructions instead of applying. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/query-data-compare-7e48
branch
from
August 6, 2026 23:43
04eafe1 to
1b80a17
Compare
Apply ops on a dedicated connection with optional all-or-nothing transaction or continue-on-error (per-op tx). Progress and a failures list show each failed key and error; skipped ops are marked after Stop. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
createdAt, updatedBy, and similar columns differ across databases even when business rows match. Detect them by name heuristic, ignore in Compare highlights and UPDATE detection by default, and omit them from migrate INSERT/UPDATE so destination triggers can populate values. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
| } = opts; | ||
|
|
||
| const ignoreLower = new Set(ignoreColumns.map((c) => c.toLowerCase())); | ||
| const sourceKeys = keyColumnsForGrid(keyNames, sourceColumns); |
Side-by-side stays plain until Compare data is turned on. Migrate ops (Add/Edit/Delete) start unchecked so the user chooses what to apply; Transaction and Stop/Continue remain safety assists. Co-authored-by: huy.phan9 <huyplb@users.noreply.github.com>
huyplb
marked this pull request as ready for review
August 7, 2026 00:30
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3bd1be44-abb7-4006-84b0-69a92eeb0148) |
3 tasks
4 tasks
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.
Summary
Follow-up to the merged compare work (#187). Adds Data migrate under Side-by-side Compare:
data_migrate_runshistory (API under/data-migrations+POST /data-migrate/execute)createdAt/updatedBy/ similar in Compare highlights and migrate Edit detection; omit them from INSERT/UPDATE so destination triggers fill themCell colors from Compare remain for visual scanning; migrate uses key-based classification.
Side-by-side Compare data with Add/Edit/Delete migrate bar
How to use
SELECT … ORDER BY …Test plan
classifyRowsByKey,buildDataMigratePlans,triggerManagedColumns, ignore-column compareTo show artifacts inline, enable in settings.