Download the PHP package benjaminhu/php-mysql-diff without Composer

On this page you can find all versions of the php package benjaminhu/php-mysql-diff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-mysql-diff

PHP MySQL Diff

MySQL Schema Diff - Comparison / Migration Script Generation

This is a fork of camcima/php-mysql-diff.

Why not mysqldiff from MySQL Utilities?

MySQL Utilities includes a similar tool, mysqldiff, that is absolutely horrible! The purpose of this project is to provide a tool that is simple to use, reliable and fast.

Installation

To install PHP MySQL Diff, install Composer and issue the following command:

Then, make sure you have ~/.composer/vendor/bin in your PATH, and you're good to go:

Update

You can update PHP MySQL Diff through this command:

Usage

Database Creation Scripts

PHP MySQL Diff works with database creations scripts created by mysqldump, which is part of the MySQL distribution. In order to generate a database creation script, use the following command:

This tool may not work with creation scripts generated by other means because it relies on finely tuned regular expressions that could not work if the file format is different.

I chose to work with database creation scripts instead of working by connecting to the databases directly because it's more portable that way and you can work offline. In the future, I might develop the option to fetch the information directly from the database INFORMATION_SCHEMA table.

Diff

where from is the path to the initial database creation script and to is the path to the target database creation script.

Ignore Tables

Use the -i option to ignore tables during comparison. The file format is a list of regular expressions to match the table names to be ignored, one per line.

Example:

Output File

The output will be like this:

▲ = only present in the TO database

► = different definitions between FROM and TO databases

▼ = only present in the FROM database

Migration Script

where from is the path to the initial database creation script and to is the path to the target database creation script.

Ignore Tables

Use the -i option to ignore tables during comparison. The file format is a list of regular expressions to match the table names to be ignored, one per line.

Example:

Output File

If the -o option is not used, the migration script will be output to the stdout.

The output (with the -o option) will be like this:

and the migration script will look like this:

Display Progress

For long running migrations, it is recommended to use the -p option to display the progress of the running migration.

Contribute

Feel free to send your contributions as PR. Make sure you update/write new tests to support your contribution. Please follow PSR-2.


All versions of php-mysql-diff with dependencies

PHP Build Version
Package Version
Requires php Version >7.4
symfony/console Version ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package benjaminhu/php-mysql-diff contains the following files

Loading the files please wait ....