Package Data | |
---|---|
Maintainer Username: | yadakhov |
Maintainer Contact: | yada.khov@gmail.com (Yada Khov) |
Package Create Date: | 2016-08-02 |
Package Last Update: | 2023-08-09 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 03:02:55 |
Package Statistics | |
---|---|
Total Downloads: | 9,651 |
Monthly Downloads: | 255 |
Daily Downloads: | 22 |
Total Stars: | 25 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
A wrapper package to run mysqldump from laravel console commands.
composer require yadakhov/laradump
Or add to your composer.json
"require": {
"yadakhov/laradump": "^1.0"
},
config/app.php
'providers' => [
// ...others
Yadakhov\Laradump\LaradumpServiceProvider::class,
],
config/laradump.php
.php artisan vendor:publish
Once the LaradumpServiceProvider is registered, the commands will show up when you do a php artisan
.
php artisan
...
laradump
laradump:list List all tables to perform individually.
laradump:mysqldump Perform a MySQL dump.
laradump:restore Perform a restore.
...
php artisan laradump:mysqldump
Will perform a mysqldump of each table in your database and store it in the storage/dumps
folder.
php artisan laradump:restore
Will load all sql files in /storage/dumps.
php artisan laradump:mysqldump --table=user
php artisan laradump:restore --table=user
# To see a list of possible tables
php artisan laradump:list
# Create the tables for storing the files
mkdir storage/laradump/tables
mkdir storage/laradump/data
sudo chmod o+w -R storage