mtolhuijs / laravel-database-synchronizer
使用简单命令同步生产环境和开发数据库
0.3.6
2021-02-24 18:23 UTC
Requires
- ext-pdo: *
- doctrine/dbal: ~2.3
- illuminate/support: ~5|~6|~7|~8
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0|~4.0|~5.0|~6.0
- phpunit/phpunit: ~7.0|~8.0|~9.0|~10.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-08-29 05:06:37 UTC
README
保持生产环境和开发数据库同步
此包将完全同步在配置中指定的 "from" 和 "to" 数据库或通过命令选项指定的数据库。
想要合作?太好了!请查看 contributing.md 了解待办事项清单。
安装
通过Composer
$ composer require mtolhuijs/laravel-database-synchronizer
可选 您可以运行 php artisan vendor:publish --provider mtolhuijs\LDS\DatabaseSynchronizerServiceProvider
,这将创建一个根配置文件夹中的配置文件以调整包的行为。
使用方法
此包包含1个命令
php artisan db:sync
将您的 "from" 数据库与 "to" 数据库同步
db:sync
{ --from= : Synchronize data from this database instead of the one specified in config }
{ --to= : Synchronize data to this database instead of the one specified in config }
{ --t|tables=* : Only run for given table(s) }
{ --st|skip-tables=* : Skip given table(s) }
{ --l|limit= : Limit query rows (defaults to 5000) }
{ --truncate : Truncate before inserting data }
变更日志
请参阅 changelog 了解最近更改的信息。
贡献
请参阅 contributing.md 了解详细信息及待办事项清单。
安全
如果您发现任何与安全相关的问题,请通过作者邮箱而不是使用问题跟踪器来联系。
鸣谢
许可
许可。请参阅 许可文件 了解更多信息。