|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2021-07-16 (4 days ago) ||Not yet rated by the users||Total: 18 This week: 18||All time: 10,320 This week: 8|
This package can make MySQL database schema changes generating SQL.
It can connect to a given MySQL database server using credentials read from an XML or JSON configuration files.
The package can extract the database table schema and generates a JSON file that describes the table structure.
It can also connect to another MySQL database server and generates the necessary SQL statements to perform the table schema changes to update it to be the same that is read from a JSON file previously generated from the schema of the database that is more up to date.
MySQL schema, a simple MySQL schema synchronization utility. This will create an UPDATE/ADD query automatically based on the schema difference in the database and schema file.
Why we use MySQL Scheman
Developers find it very hard to synchronize MySQL schema while developing any application. The current conventional method is to create an SQL file with all the changes & update it in the staging/production server. The main demerit of this method is if there are multiple people and multiple SQL changes on the same table the process is a bit hectic. In order to solve this, we developed a platform where you can update the schema in a file, and by running sync to database it will create the SQL Query for the changes and it will execute.
If you use Composer, you can install MySQL Scheman with the following command:
Or alternatively, include a dependency for MySQL Scheman in your composer.json file. For example
A database configuration file should be there to communicate with the database. Please see the sample files and create a copy in your working directory with your database credentials.
### Usage (CLI)
To CLI Help
Exporting Database to Schema File:
./vendor/bin/scheman --config config.json --export yourdatabase.json
Sync the file schema with your database
./vendor/bin/scheman --config config.json --sync yourdatabase.json
See the `LICENSE` file.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.