mayconbordin/l5-db-commands 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mayconbordin/l5-db-commands

最新稳定版本:v1.1

Composer 安装命令:

composer require mayconbordin/l5-db-commands

包简介

A set of commands to create/drop/dump/restore databases on Laravel 5

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

A set of commands to create/drop/dump/restore/shell databases on Laravel 5.

Supported DBMSs: MySQL, PostgreSQL and SQLite.

Installation

In order to install just add

"mayconbordin/l5-db-commands": "dev-master"

to your composer.json. Then run composer install or composer update.

Then in your config/app.php add

'Mayconbordin\DbCommands\DbCommandsServiceProvider'

in the providers array.

Commands

db:create [options]

Create a new database with the default connection from the configuration file.

Options:

  • --database: The name of the database connection in the configuration file.

db:drop [options]

Drop an existing database with the default connection from the configuration file.

Options:

  • --database: The name of the database connection in the configuration file.

db:dump [options] [--] [<output>]

Dump the schema and data of an existing database with the default connection from the configuration file. By default the dump is printed on the screen, optionally it can be written to <output>.

Options:

  • --database: The name of the database connection in the configuration file.
  • --data-only: Dumps only the data.

db:restore [options] [--] <dump-file>

Restore the schema and data from <dump-file> to an existing database with the default connection from the configuration file.

Options:

  • --database: The name of the database connection in the configuration file.

db:shell [options]

Open a shell to an existing database with the default connection from the configuration file.

For PostgreSQL you might have to create a ~/.pgpass file with localhost:5432:mydbname:postgres:mypass and chmod 600.

Options:

  • --database: The name of the database connection in the configuration file.

db:exec:sql [options] [--] <file>

Execute SQL file from <file> to an existing database with the default connection from the configuration file.

Options:

  • --database: The name of the database connection in the configuration file.

统计信息

  • 总下载量: 1.01k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-29