Repository navigation
feat(data-migrate): apply up to 2,000 row ops, one cap shared by screen and route - #560
Merged
Merged
Conversation
…en and route The browser capped Data migrate at 500 ops and the route refused more than 500, each holding its own copy. DATA_MIGRATE_MAX_OPS (2,000, in @foxschema/shared) now drives both, matching the compare window so every difference a compare run finds can be applied from the screen that found it. Past it, the Server Beam pointer stays. The restore snapshot is built from the destination rows already loaded (no key IN-list query), so 2,000 rows need no chunking; the 10 MB body limit holds them. Phase B of docs/plans/2026-10-17-data-compare-and-sql-tracer.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: d610fc9d-c40b-4f7f-a288-404682ca7994) |
# Conflicts: # apps/web/src/frontend/features/sql-editor/components/ResultsPanel.tsx
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: e6f61331-602f-495b-a18a-d46a76c359fa) |
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.
Phase B of
docs/plans/2026-10-17-data-compare-and-sql-tracer.md, following #559.Change
DATA_MIGRATE_MAX_OPS = 2000lives in@foxschema/shared. The browser's cap (DATA_MIGRATE_ROW_CAP) and the/data-migrate/executecheck both read it. Before, each side held its own copy of 500.Tests
data-migrate.routes.test.ts: 2,000 ops are accepted and 2,001 are refused with 400. The old 500 cap would have refused 2,000.resultRowDiff.test.ts: 2,100 ops are cut to the shared cap of 2,000.🤖 Generated with Claude Code
Note
Medium Risk
Raises the volume of DML per request and changes a shared contract; behavior is bounded by existing migrate guards and tests, but larger batches increase blast radius if mis-synced rows are applied.
Overview
Side-by-side Data migrate can now apply up to 2,000 insert/update/delete ops in one batch (was 500). The limit is defined once as
DATA_MIGRATE_MAX_OPSin@foxschema/shared; the SQL editor’sDATA_MIGRATE_ROW_CAPandPOST /data-migrate/executeboth read that value so the UI and API stay aligned.2,000 matches the compare window size, so differences found in a full compare run can be migrated from the same screen without hitting the old cap first. Compare hints and migrate bar copy use the shared constant for the displayed limit; larger batches still point users to Server Beam.
Tests cover client-side truncation at 2,000 ops and server acceptance of 2,000 vs rejection of 2,001.
Reviewed by Cursor Bugbot for commit b07bb75. Bugbot is set up for automated code reviews on this repo. Configure here.