Comparing schemas
What SchemaSync compares, how objects are matched, and how to read the results.
Comparison reads the full structure of both schemas and matches objects by name within their type. Everything reported is derived from INFORMATION_SCHEMA and the canonical SHOW CREATE output, so what you see is what the server itself reports.
What is compared
| Object | Compared in detail |
|---|---|
| Tables | Engine, character set, collation, row format, comment, AUTO_INCREMENT, partitions |
| Columns | Type, length, nullability, default, collation, extra attributes, ordinal position |
| Generated columns | Expression, and whether VIRTUAL or STORED |
| Indexes | Columns and order, uniqueness, method, prefix length, visibility |
| Foreign keys | Referenced table and columns, ON DELETE and ON UPDATE actions |
| Views | Definition, DEFINER, SQL SECURITY, check option |
| Routines | Body, parameters, return type, determinism, SQL data access |
| Triggers | Event, timing, order, body |
| Events | Schedule, status, body |
Differences people usually miss
Two definitions can look identical on screen and still differ in ways that matter at runtime. The comparison reports all of them:
- Collation set on an individual column rather than inherited from the table.
- Index column order —
(a, b)and(b, a)are different indexes with different performance. ROW_FORMATand storage engine, which affect both size and locking behaviour.- Routine
DEFINER, which decides whose privileges the routine runs with. - Column ordinal position, which changes the shape of
INSERTstatements without a column list.