josh-taylor / migrations-generator
This package is abandoned and no longer maintained.
No replacement package was suggested.
Migrations generator for Laravel.
0.1.0
2016-03-06 22:57 UTC
Requires
- doctrine/dbal: ^2.5
- illuminate/console: ^5.2
- illuminate/support: ^5.2
- laracasts/generators: ^1.1
Requires (Dev)
- illuminate/database: ^5.2
- phpunit/phpunit: ^4.8
This package is auto-updated.
Last update: 2022-02-01 12:56:10 UTC
README
Generate migrations from an existing database. Ideal for use when migrating an app to Laravel.
Please note, this is still really a work in progress. Worth noting the things left to do below.
Installation
Step 1: Composer
From the command line run:
composer require josh-taylor/migrations-generator --dev
Step 2: Service Provider
For your Laravel app, you will only want these commands available during development, open app/Providers\AppServiceProvider.php
and add in to the register()
method:
if ($this->app->environment() == 'local') { $this->app->register('JoshTaylor\MigrationsGenerator\MigrationsGeneratorServiceProvider'); }
Usage
Run from the command line:
php artisan migrate:generate
Bask in the glory of all these migrations created for you.
Still left to do:
$table->increments()
and$table->timestamps()
are always added. (May require moving away from laracasts/Laravel-5-Generators-Extended)- Column length is not generated (See above, plus issues with DBAL)
- ...