portable/laravel-db-tools
最新稳定版本:v1.0.1
Composer 安装命令:
composer require portable/laravel-db-tools
包简介
Database import and export for Artisan
README 文档
README
Laravel's Artisan is great and one of the strengths of the framework is how database agnostic almost everything is. Except database dumps. And imports.
This package attempts to help cover that gap and provides:
php artisan db:export ?--compressed ?--command-only {filename}
Export the database to the file given by filename (autogenerated if not provided) using the database native CLI tools (e.g pg_dump ). If pv is installed in the environment, a progress bar will be shown.
php artisan db:import ?--compressed ?--command-only ?--drop {filename}
Import the database given by filename using the database native CLI tools (e.g psql). If --drop specified, drops and re-creates the database prior to import. If pv is installed in the environment, a progress bar will be shown.
For both commands, --command-only will echo the command that would be run, but doesn't execute it.
If compressed is specified, uses gzip and gunzip to compress data - useful if you're transporting the output.
If you attempt to run the commands in production, issues a warning and asks for confirmation before continuing.
Currently, only postgres and mySQL adapters are supported. PRs for additional database drivers would be welcome.
统计信息
- 总下载量: 9.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-16