Writing database migration scripts by hand is one of the most error-prone tasks in software development. Miss a column, forget an index, or reverse the direction of a foreign key and you've got a production incident. ER Flow's migration generation feature eliminates this risk by automatically diffing your schema against a saved checkpoint and producing a precise, ready-to-run migration file.
The migration workflow is built around checkpoints. When your schema reaches a stable state — after a sprint, before a deployment, or at any meaningful milestone — save a checkpoint. Continue designing: add tables for new features, modify columns, add indexes. When you're ready to deploy, open the migration generator. ER Flow diffs your current schema against the last checkpoint and shows you every table created, every column modified, every index added. Click generate and get a migration file that captures exactly those changes.
ER Flow generates migrations for multiple frameworks. Laravel developers get complete migration files with up() and down() methods. Phinx users get PHP migration classes. Raw SQL output is available for any database system. All generated migrations include both the forward migration and the rollback — because production deployments always need a safe exit.
Save a checkpoint of your schema at any point. ER Flow tracks every subsequent change against that baseline. The diff engine compares column types, nullability, default values, indexes, and foreign keys — producing a complete, accurate change set.
Generate complete Laravel migration files with Schema::create, Schema::table, up() and down() methods. ER Flow maps every column type and constraint to the correct Laravel fluent builder call.
Generate Phinx PHP migration classes for teams using the Phinx migration library with CakePHP, Slim, or standalone. ER Flow produces correct up() and rollback() methods with proper column type mappings.
Export a raw SQL migration script compatible with any relational database. The diff produces CREATE TABLE, ALTER TABLE, ADD COLUMN, DROP COLUMN, and ADD CONSTRAINT statements for the exact changes made since the checkpoint.
Free to get started. No credit card required.