Versioned schema migrations
Apr 5, 2023Brian Morrison II

Summary
This post details how versioned schema migrations, a common pattern in application development (e.g., with Laravel's Artisan), can be applied to PlanetScale databases. It explains the mechanics of migration files, the `migrations` tracking table, and the `migrate` and `rollback` commands. It also outlines how to use these migrations with PlanetScale, differentiating between workflows with and without 'safe migrations' enabled, emphasizing the use of PlanetScale branches and deploy requests for production changes.