https://github.com/barryvdh/laravel-migration-generator
Generate migrations based on existing tables
https://github.com/barryvdh/laravel-migration-generator
Last synced: about 1 month ago
JSON representation
Generate migrations based on existing tables
- Host: GitHub
- URL: https://github.com/barryvdh/laravel-migration-generator
- Owner: barryvdh
- Archived: true
- Created: 2013-05-07T21:42:26.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-23T08:35:31.000Z (almost 11 years ago)
- Last Synced: 2024-11-11T05:40:06.698Z (7 months ago)
- Language: PHP
- Size: 238 KB
- Stars: 245
- Watchers: 13
- Forks: 30
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Laravel4 Migration Generator
### Generate migrations based on existing tables
***You might want to checkout https://github.com/Xethron/migrations-generator 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
'Barryvdh\MigrationGenerator\MigrationGeneratorServiceProvider',
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 https://github.com/JeffreyWay/Laravel-4-Generators
This assumes the key is 'id' and timestamps (created_at/updated_at) are generated by default.