daavelar / revengedb
该软件包最新版本(3.0.7)没有提供许可证信息。
RevengeDb 提供了一个 artisan 命令,用于对数据库进行反向工程,自动为您生成迁移文件
3.0.7
2015-11-11 03:34 UTC
Requires
- php: >=5.5.0
- doctrine/dbal: ~2.5.1
- illuminate/support: ~5.1
- laracasts/generators: ~1.1.2
README
使用此软件包,您可以将现有的模式(目前仅支持 mysql)转换为 Laravel 的迁移文件,以下命令可以做到这一点
php artisan revengedb:migrations
安装
将软件包添加到您的 Laravel 项目中
composer require daavelar/revengedb
将 ServiceProvider 添加到 app.php 文件中
Daavelar\RevengeDb\Providers\RevengeDbServiceProvider::class
使用
为您的 mysql 配置中的所有数据库表生成迁移文件
php artisan revengedb:migrations
如果您只想对一张或多张表执行操作,只需传递参数即可
php artisan revengedb:migrations --only=table1,table2,table3
如果您只想排除一张或多张表,可以传递 except 参数
php artisan revengedb:migrations --except=table1,table2,table3
重要:所有迁移文件都将生成带有 $table->timestamps() 行。