Skip to content

Add install and CLI docs #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
Tools to compare database schemas and table rows.

# Installation

Install `python-dbdiff` from PyPI:

```bash
pip install python-dbdiff
```

This will install two command line tools named `schemadiff` and `datadiff`.

# General Architecture

schema/__init__.py has a database-agnostic schema framework:
Expand All @@ -25,6 +35,20 @@ The main.py script imports the schema for source and destination database and ou
The maindata.py script compares the tables rows in the source and destination databases. It depends on the schema
framework to determine how to construct primary key objects for each table.

# CLI Usage

After installation the `schemadiff` and `datadiff` commands become available. Run
`--help` on either command to see all options. The most common invocations are:

```
schemadiff diffschema DB1_ENV_FILE DB2_ENV_FILE [--uppercase|--lowercase]
schemadiff diffprocs DB1_ENV_FILE DB2_ENV_FILE
schemadiff tablelist DB_ENV_FILE [--uppercase|--lowercase]

datadiff tablediff DB1_ENV_FILE DB2_ENV_FILE [TABLE ...] [--uppercase|--lowercase]
datadiff tablereport DB_ENV_FILE [TABLE ...]
```




Expand Down