PlanetScale's branching technology provides a Git-like workflow for database schema changes, enabling safe, non-blocking, and rolling upgrades. This post introduces native MySQL `INPLACE` and `INSTANT` DDL, detailing their capabilities and limitations. `INPLACE` is found to be unsuitable for production due to replication lag and resource intensiveness. `INSTANT` DDL is ideal for metadata changes and simple column additions/drops but is limited in scope and lacks revertibility for destructive operations. For more complex changes, external tools like Vitess, gh-ost, and pt-online-schema-change are still the go-to solutions, offering similar design principles but operating differently and taking longer. The post emphasizes that while `INSTANT` DDL is preferred where supported, the majority of common schema changes still require these external tools, leading to a complexity of maintaining multiple techniques. Vitess and Spirit are highlighted for their ability to auto-detect when a migration can be fully handled by `INSTANT` DDL.
All PlanetScale trails