Skip to main content

Check the difference of MySQL schema (CREATE TABLE)

Project description

sqldiffer

PyPI PyPI - Python Version GitHub

Check the difference of MySQL schema (CREATE TABLE)

Feature

  • Check the difference of MySQL schema
    • Compare CREATE TABLE
    • Choose whether to ignore AUTO_INCREMENT and CHARSET
  • Output HTML
    • Save the difference for each table in HTML (Click here for sample)

Installation

pip install sqldiffer

Usage

sqldiffer -h
usage: sqldiffer [-h] --server1 SERVER1 --server2 SERVER2 [-o OUTPUT_DIR] [--skip-auto-increment] [--skip-charset] [-V]

Check the difference of MySQL schema (CREATE TABLE)

optional arguments:
  -h, --help            show this help message and exit
  --server1 SERVER1     Comparison source. [Format] user:password@host:port/database
  --server2 SERVER2     Comparison target. [Format] user:password@host:port/database
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Directory to save files. Default is current directory.
  --skip-auto-increment
                        Whether to ignore the difference of "AUTO_INCREMENT=[0-9]+"
  --skip-charset        Whether to ignore the difference of "CHARSET=[a-z0-9]+"
  -V, --version         Show command version

Examples

Check the differences

sqldiffer --server1 homoluctus:test@aroundtheworld:3306/aaa \
          --server2 homoluctus:test@anothersky:3306/aaa

Ignore charset

sqldiffer --server1 homoluctus:test@aroundtheworld:3306/aaa \
          --server2 homoluctus:test@anothersky:3306/aaa \
          --skip-charset

Ignore auto_increment and charset

sqldiffer --server1 homoluctus:test@aroundtheworld:3306/aaa \
          --server2 homoluctus:test@anothersky:3306/aaa \
          --skip-auto-increment \
          --skip-charset

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqldiffer-0.1.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

sqldiffer-0.1.2-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page