Package Data | |
---|---|
Maintainer Username: | mayconbordin |
Maintainer Contact: | mayconbordin@gmail.com (Maycon Viana Bordin) |
Package Create Date: | 2015-08-29 |
Package Last Update: | 2017-09-12 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:02:44 |
Package Statistics | |
---|---|
Total Downloads: | 1,007 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 5 |
Total Watchers: | 3 |
Total Forks: | 2 |
Total Open Issues: | 0 |
A set of commands to create/drop/dump/restore/shell databases on Laravel 5.
Supported DBMSs: MySQL, PostgreSQL and SQLite.
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.
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 withlocalhost: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.