exp:ezsqldiff
Available before Exponential 6: the 4.x kernel had it already; the 4.x reference had no page for it.
Summary
Show the differences between two database schemas; the exit code tells if they differ
Usage
./console exp:ezsqldiff [options] php bin/php/ezsqldiff.php [options]
Help
The output of ./console help exp:ezsqldiff (the script run with --help), without the standard options:
Usage: bin/php/ezsqldiff.php [OPTION]... [SOURCE] [MATCH]
Exponential SQL diff
Displays differences between two database schemas,
and sets exit code based whether there is a difference or not
ezsqldiff.php --type mysql --user=root stable32 stable33
Options:
--source-type=VALUE Which database type to use for source, can be one of:
mysql, postgresql
--source-host=VALUE Connect to host source database
--source-user=VALUE User for login to source database
--source-password=VALUE Password to use when connecting to source database
--source-socket=VALUE Socket to connect to source database (only for MySQL)
--match-type=VALUE Which database type to use for match, can be one of:
mysql, postgresql
--match-host=VALUE Connect to host match database
--match-user=VALUE User for login to match database
--match-password=VALUE Password to use when connecting to match database
--match-socket=VALUE Socket to connect to match database (only for MySQL)
-t
--type=VALUE Which database type to use for match and source, can be one of:
mysql, postgresql
--host=VALUE Connect to host match and source database
-u
--user=VALUE User for login to match and source database
-p
--password=VALUE Password to use when connecting to match and source database
--socket=VALUE Socket to connect to match and source database (only for MySQL)
--lint-check Instead of comparing 2 datase schemas, verify source database schema for standards compliance
--reverse Reverse the differences
--check-only Don't show SQLs for the differences, just set exit code and returnOptions
| Option | Value | Description |
|---|---|---|
| --source-type | required | |
| --source-host | required | |
| --source-user | required | |
| --source-password | optional | |
| --source-socket | required | |
| --match-type | required | |
| --match-host | required | |
| --match-user | required | |
| --match-password | optional | |
| --match-socket | required | |
| -t | required | |
| --type | required | |
| --host | required | |
| -u | required | |
| --user | required | |
| -p | required | |
| --password | optional | |
| --socket | required | |
| --lint-check | - | |
| --reverse | - | |
| --check-only | - |
Arguments
[source][match]
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/ezsqldiff.php, kernel/private/classes/commands/ezsqldiff.php
See also
Generated example: exp:ezsqldiff
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment