PlanetScale

Zero downtime Laravel migrations

Aug 29, 2022Holly Guevara
Zero downtime Laravel migrations
SummaryAI, from the source post

This post details how to achieve zero downtime Laravel migrations by leveraging PlanetScale's database branching and online schema change capabilities. It explains the dangers of direct DDL during deployment, the mechanics of non-blocking schema changes (shadow tables, atomic swaps), and provides detailed workflows for adding/dropping columns/tables and renaming columns/tables. It also covers the bonus feature of reverting schema changes within a 30-minute window by keeping the old table around and syncing data back, and clarifies that Laravel migrations should only be run on development environments connected to PlanetScale development branches, not production.

More from the Vitess Release Management trail