Overview

The executable is typically named BaseDiffConsole (for example BaseDiffConsole.exe on Windows). It is designed for automation, CI/CD pipelines, and advanced database management tasks.

BaseDiffConsole <command> [arguments...]
SimpleCompare

Lightweight comparison — mainly tables and columns (create / drop / alter).

Configuration is either a BaseDiff project file (.bdfJson) or explicit connection parameters.

AliasTypeDescription
s | silentFlagMinimal console output FLAG
p | projectStringPath to the project file (.bdfJson)
sdt | sourceDatabaseTypeEnumMSSQL, PostgreSQL, MySQL, Oracle, Sqlite
ssn | sourceServerNameStringSource Server
sdn | sourceDatabaseNameStringSource Database name
ddt | destinationDatabaseTypeEnumDestination database type
ddn | destinationDatabaseNameStringDestination database name
o | outScriptPathStringOutput path for a single update script file
FullCompare

Full comparison — all change categories from the script generator.

Inherits all options from SimpleCompare and adds advanced filtering and migration script support.

BaseDiffConsole FullCompare -silent p=D:\Work\Project.bdfJson o=D:\Out\update.sql
DownloadSchema

Reads database structure and writes it to a single JSON file.

AliasTypeDescription
o | outputStringOutput JSON file path REQUIRED
dt | databaseTypeEnumDatabase type (MSSQL, PostgreSQL, etc.)
sn | serverNameStringServer Name
dn | databaseNameStringDatabase Name
l | loginStringLogin
pass | passwordStringPassword
JsonCompare

Compare two databases described by JSON schema files.

BaseDiffConsole JsonCompare sjson=D:\schema-prod.json djson=D:\schema-stg.json sdt=MSSQL ddt=MSSQL

Exit Codes

ValueMeaning
-1Unhandled exception (error). The process failed.
0Success. No differences found (for Compare commands).
> 0Success. The value represents the number of differences found.

Examples

Direct connection (Windows Bash/Linux):
BaseDiffConsole FullCompare -silent \
  sdt=MSSQL ssn=127.0.0.1 sa=MicrosoftSqlServer sl=sa spass=secret sdn=SourceDB \
  ddt=MSSQL dsn=127.0.0.1 da=MicrosoftSqlServer dl=sa dpass=secret ddn=TargetDB
Export and then compare JSON:
BaseDiffConsole DownloadSchema o=prod.json dt=MSSQL sn=prod-sql a=MicrosoftSqlServer l=user pass=pw dn=App
BaseDiffConsole DownloadSchema o=stg.json dt=MSSQL sn=stg-sql a=MicrosoftSqlServer l=user pass=pw dn=App
BaseDiffConsole JsonCompare sjson=prod.json djson=stg.json sdt=MSSQL ddt=MSSQL
Feedback