jezzis/mysqlsyncer
MYSQL-SYNCER (Laravel 5 Package)
This tool provide an easy way to synchronize database structure including tables, views, functions, procedures for Laravel 5.
Installation
- In order to install mysql-syncer, just add
"jezzis/mysqlsyncer":"dev-master"
to your composer.json. Then run composer install or composer update.
- In your
config/app.phpadd
Jezzis\MysqlSyncer\MysqlSyncerServiceProvider::class
Configuration
If you want to customize the base path of the sql file, please copy src/config.php to laravel project config directory, rename it to msyncer.php
return [
'sql_path' => './', // sql file base path where MySQL-Syncer is looking for.
'driver' => 'mysql', // connection driver, currently only supports MySQL.
];
Usage
run the command in console:
# php artisan db:sync --drop <file>
Params
- file: The file path of the sql file, without .sql extension
Options
- --drop: allow drop columns, keys
Troubleshooting
Grant select privilege on mysql.func and mysql.proc to make sure the tools can fetch the definition of functions & procedure.
License
mysql-syncer is free software distributed under the terms of the MIT license.
Contribution guidelines
Support follows PSR-1 and PSR-4 PHP coding standards, and semantic versioning.
Please report any issue you find in the issues page. Pull requests are welcome.
Related Packages
Integration layer allowing use of the Laravel database library in CodeIgniter ap...
A database backed config loader for Laravel with per-site configuration.
Integration layer allowing use of the Laravel database library in CodeIgniter ap...