adamkearsley / convert-migrations
Artisan command to convert your current SQL database schema into a Laravel 4 Migration file.
Installs: 8 478
Dependents: 0
Suggesters: 0
Security: 0
Stars: 91
Watchers: 6
Forks: 36
Open Issues: 11
Requires
- php: >=5.5.0
- illuminate/console: 5.*
- illuminate/support: 5.*
This package is not auto-updated.
Last update: 2024-11-19 08:11:17 UTC
README
This is an artisan command to convert your current SQL database schema into a Laravel 4 Migration file. It'll come really handy when you have started a Laravel project without using migrations, or if you're migrating an old app to Laravel.
Installation
- Add the package to your composer.json file and run
composer update
:
"require": { "adamkearsley/convert-migrations": "dev-master" }
- Add
'Adamkearsley\ConvertMigrations\ConvertMigrationsServiceProvider'
to yourapp/config/app.php
file, inside theproviders
array.
Usage
Now it's as easy as running php artisan convert:migrations myDatabaseName
. Wait a few seconds and, magically, you'll have a new migration in app/database/migrations
.
Ignoring Tables
You can even ignore tables from the migration if you need to. Just use the ignore
option and separate table names with a comma: php artisan convert:migrations --ignore="table1, table2"
.
Credits
Credits go to "bruceoutdoors" original class.