From d799178fbe5e632256795ad0fac03aae0b7f4935 Mon Sep 17 00:00:00 2001 From: Chris Maeda Date: Thu, 29 May 2025 00:28:25 -1000 Subject: [PATCH] docs: add installation and CLI usage --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 4ef6e98..c8a8e4d 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 ...] +``` +