Jezzis / mysql-syncer by Jezzis

This package provides a easy way to synchronize database structure to laravel
53
2
1
Package Data
Maintainer Username: Jezzis
Maintainer Contact: songzijian728@gmail.com (jezzis)
Package Create Date: 2016-11-23
Package Last Update: 2017-08-11
Language: PHP
License: MIT
Last Refreshed: 2024-12-24 03:03:14
Package Statistics
Total Downloads: 53
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

MYSQL-SYNCER (Laravel 5 Package)

Build Status Coverage Status Latest Stable Version License Total Downloads

This tool provide an easy way to synchronize database structure including tables, views, functions, procedures for Laravel 5.

Installation

  1. In order to install mysql-syncer, just add
  "jezzis/mysqlsyncer":"dev-master"

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

  1. In your config/app.php add
    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.