Repository navigation
feat: remove schema compare - #577
Merged
Merged
Conversation
Closes #369, #370, #371, #372, #373, #374. Schema compare could not back the claim it made, and a compare tool that is quietly wrong is worse than none, because people act on its answer. - SchemaSnapshot had no foreignKeys field, so two schemas differing only in their foreign keys compared as identical (#370) - DDL was normalised by lowercasing and collapsing whitespace before being compared, which mangles string literals and identifiers — reporting differences that are not there and missing ones that are (#371) - column order was ignored, so a reorder read as no change (#374) - the sync half ran each statement independently, leaving a target half-migrated when one failed (#369), and built `USE ${database}` by raw string concatenation (#372) Fixing all of that is a real piece of work — a proper DDL comparison rather than string normalisation is most of it — and the feature is not part of how this project is used. Removing it now is cheaper than carrying it, and the history has it if someone wants it back. Gone: SchemaCompare, SyncPreview, schema-diff, sync-sql-generator, their tests, the "compare" editor tab type, and the entry points in the menu bar, title bar and toolbar. 840 lines of feature, about 1,100 with tests. Two things kept deliberately. The test asserting that right-clicking a toolbar button does not open the system menu now right-clicks Admin — it used Compare only because it was there, and the behaviour still matters. And get_foreign_keys stays: the designer uses it, and it was written for the designer in #551. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Closes #368, #369, #370, #371, #372, #373, #374, #375.
Schema compare couldn't back the claim it made, and a compare tool that's quietly wrong is worse than none — people act on its answer.
SchemaSnapshothad noforeignKeysfield ([P0][bug] SchemaSnapshot has no foreignKeys field — schema diff silently misses all FK changes; sync generator emits no FK DDL #370), so two schemas differing only in their foreign keys compared as identical.USE ${database}by raw string concatenation ([P1][security] SyncPreview USE ${targetDatabase} uses raw string concat — targetDatabase not escaped via escapeId #372).Fixing all of that is real work — a proper DDL comparison rather than string normalisation is most of it — and the feature isn't part of how this project is used. Removing it now is cheaper than carrying it, and the history has it if anyone wants it back.
What went
SchemaCompare,SyncPreview,schema-diff,sync-sql-generator, their tests, thecompareeditor tab type, and the entry points in the menu bar, title bar and toolbar. −2,617 lines, +9.Two things kept deliberately
The test asserting that right-clicking a toolbar button doesn't open the system menu now right-clicks Admin. It used Compare only because it happened to be there, and the behaviour it checks still matters.
get_foreign_keysstays — the designer uses it, and it was written for the designer in #551, not for compare.Also
README's "Schema Comparison" section and the
compare/line in its source tree are gone. While there, the tree still listedSQLPreviewDialogunderdesigner/; it moved tocommon/in #558, so that's corrected too.1778 unit + 299 browser green; tsc/dprint/eslint clean.
🤖 Generated with Claude Code