Status-colored DDL diff + Execute safety gates (all dialects) - #14
Merged
Conversation
- DDL diff: left=Source(original)/right=Target(destination) to match the toolbar's connection panel order; diff highlight now signals what the migration will do (green=new object, amber=modified, red=dropped) instead of a fixed add/remove color pair. Driven entirely by TableDiff.status, so it applies uniformly across all 10 dialects with no per-dialect branching. - Execute button: four existing risk signals that only warned now actively block the button until resolved — drop-dependency conflicts (removed the one-click "Deploy anyway" bypass), destructive drops without non-destructive mode, an unhealthy target connection, and MySQL/MariaDB routine+binlog privilege risk. The two acknowledgment checkboxes are keyed to the exact generatedSql they were ticked against, so any plan change invalidates a stale acknowledgment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eslint/js was never imported in eslint.config.js — the config uses only typescript-eslint's parser and eslint-plugin-security, no @eslint/js rules. A recent @eslint/js@10.0.1 release requires eslint@^10.0.0 as a peer, which conflicts with the pinned eslint@^9.0.0, breaking every CI job that runs npm install fresh (no lockfile is committed). Removing the unused dep resolves the ERESOLVE conflict without touching the actual lint toolchain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
DDL diff orientation & color: left pane = Source (original), right pane = Target (destination) — matches the Source/Target connection panel order in the toolbar. Diff highlight color now signals what the migration will do to the object rather than a fixed add/remove pair: 🟢 green = new object, 🟠 amber = modified, 🔴 red = dropped. Driven entirely by
TableDiff.status, so it's dialect-agnostic — applies identically across all 10 dialects.Execute button safety gates: four risk signals that previously only showed a dismissible warning now actively block Execute until resolved:
DROP TABLE/COLUMN/INDEX) with non-destructive mode off — requires an explicit checkbox acknowledgment.Acknowledgment checkboxes are keyed to the exact
generatedSqlthey were ticked against, so any change to the migration plan (new selection, toggling non-destructive) silently invalidates a stale checkbox instead of carrying forward consent for a plan the user never actually saw.See docs/plans/2026-06-30-diff-colors-and-safety-gates.md for the full writeup.
Test plan
cd apps/web && npx tsc --noEmit— cleannpx vitest run— 92/92 passingdemo_a/demo_b:ADDEDobject → green diff, "new object" legendMODIFIEDobject → amber diff, "modified" legendREMOVEDobject → red diff, "dropped" legendfindDropDependenciesscan andtargetConnectedstore field already used elsewhere in the app🤖 Generated with Claude Code