"schemadiff: in memory schema analysis, validation, normalization, diffing, and manipulation" ( 2025 )

Sunday at 14:50, 30 minutes, H.1301 (Cornil), H.1301 (Cornil), MySQL Shlomi Noach , slides , video

schemadiff is a library within the Vitess project, which uses a programmatic approach to analyzing database schemas independently of a MySQL server. schemadiff powers Vitess' own internal schema management as well as the user facing Online DDL logic. In this session we take a deep dive into schemadiff's capabilities, and show how the community can use it to solve very common schema change and schema management tasks and problems. We discuss:

  • Parsing.
  • Per table and per database validations.
  • Normalization.
  • Diffing tables, diffing databases.
  • Schema change conflicts and dependencies.
  • Generating a successful sequential migration route.
  • In-memory schema manipulation.
  • Performance.
  • Extras: INSTANT DDL, Online DDL support, constraint analysis.

schemadiff is part of Vitess, a CNCF project released under the Apache 2 license. We illustrate some real-world scenarios from PlanetScale's (main sponsors of the Vitess project) schema deployment system.