Skip to main content
Comparing

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

ObjectCompared in detail
TablesEngine, character set, collation, row format, comment, AUTO_INCREMENT, partitions
ColumnsType, length, nullability, default, collation, extra attributes, ordinal position
Generated columnsExpression, and whether VIRTUAL or STORED
IndexesColumns and order, uniqueness, method, prefix length, visibility
Foreign keysReferenced table and columns, ON DELETE and ON UPDATE actions
ViewsDefinition, DEFINER, SQL SECURITY, check option
RoutinesBody, parameters, return type, determinism, SQL data access
TriggersEvent, timing, order, body
EventsSchedule, 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_FORMAT and 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 INSERT statements without a column list.