Skip to content

feat: remove schema compare - #577

Merged
EVWorth merged 1 commit into
mainfrom
chore/remove-schema-compare
Sep 9, 2026
Merged

EVWorth merged 1 commit into
mainfrom
chore/remove-schema-compare

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 9, 2026

Copy link
Copy Markdown
Owner

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.

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, the compare editor 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_keys stays — 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 listed SQLPreviewDialog under designer/; it moved to common/ in #558, so that's corrected too.

1778 unit + 299 browser green; tsc/dprint/eslint clean.

🤖 Generated with Claude Code

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]>
@EVWorth
EVWorth merged commit d8b46ae into main Sep 9, 2026
10 checks passed
@EVWorth
EVWorth deleted the chore/remove-schema-compare branch September 9, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit: schema compare & sync

1 participant