Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Generate migrations based on existing tables
branch: master
Failed to load latest commit information.
src Reworking to pull field types from config
.gitignore Initial commit
composer.json Add license and more info Update

Laravel4 Migration Generator

Generate migrations based on existing tables

You might want to checkout which is similar to this package, but is developed more recently and is using way/generators version 2.x. My package is still on 1.x and I'll have to see when/if I can upgrade. This package does still work, but isn't actively supported currently

Require this package in your composer.json:

"barryvdh/laravel-migration-generator": "dev-master"

And update dependencies using composer:

composer update

And add the ServiceProvider to the providers array in app/config/app.php


You can now generate the migration by running the command, followed by the tables you want to generate

php artisan migration-generate posts,users

Your migrations will be created in app/database/migrations

Migrations are generated by This assumes the key is 'id' and timestamps (created_at/updated_at) are generated by default.

Something went wrong with that request. Please try again.