https://github.com/josh-taylor/migrations-generator
Generate migrations from an existing database for Laravel
https://github.com/josh-taylor/migrations-generator
laravel laravel-package
Last synced: about 1 month ago
JSON representation
Generate migrations from an existing database for Laravel
- Host: GitHub
- URL: https://github.com/josh-taylor/migrations-generator
- Owner: josh-taylor
- License: mit
- Created: 2016-02-26T16:21:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T16:44:16.000Z (about 9 years ago)
- Last Synced: 2025-04-17T14:40:14.599Z (about 1 month ago)
- Topics: laravel, laravel-package
- Language: PHP
- Size: 27.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Migrations Generator [](https://travis-ci.org/josh-taylor/migrations-generator)
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](https://github.com/josh-taylor/migrations-generator/#still-left-to-do).
## 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:
```php
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](https://github.com/laracasts/Laravel-5-Generators-Extended))
- Column length is not generated (See above, plus issues with DBAL)
- [...](https://github.com/josh-taylor/migrations-generator/issues)