Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamkearsley/laravel-convert-migrations
This is a custom command to convert your current SQL database schema into a Laravel 4 Migration file.
https://github.com/adamkearsley/laravel-convert-migrations
Last synced: 3 months ago
JSON representation
This is a custom command to convert your current SQL database schema into a Laravel 4 Migration file.
- Host: GitHub
- URL: https://github.com/adamkearsley/laravel-convert-migrations
- Owner: adamkearsley
- Created: 2014-05-21T10:49:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-27T07:29:11.000Z (over 8 years ago)
- Last Synced: 2024-07-18T07:54:46.363Z (4 months ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 91
- Watchers: 6
- Forks: 36
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Convert Migrations
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
1. Add the package to your composer.json file and run `composer update`:
```json
"require": {
"adamkearsley/convert-migrations": "dev-master"
}
```2. Add `'Adamkearsley\ConvertMigrations\ConvertMigrationsServiceProvider'` to your `app/config/app.php` file, inside the `providers` 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](https://gist.github.com/bruceoutdoors/9166186).