B2A.DbTula.Cli
1.1.8
dotnet tool install --global B2A.DbTula.Cli --version 1.1.8
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local B2A.DbTula.Cli --version 1.1.8
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=B2A.DbTula.Cli&version=1.1.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package B2A.DbTula.Cli --version 1.1.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
🟢 B2A.DbTula.Cli – Command Line Tool
Overview
DBTula CLI is a fast, cross-platform command-line tool for comparing database schemas and generating migration scripts for PostgreSQL and MySQL. It is designed for use in local development, DevOps pipelines, and automation.
🚀 Installation
Install globally (recommended):
dotnet tool install --global dbtula
Or, use as a local tool in your repository:
dotnet new tool-manifest # if you don't have one
dotnet tool install dbtula
🔥 Usage
Basic Schema Comparison
dbtula --source "<src-conn-string>" --target "<tgt-conn-string>" --sourceType postgres --targetType mysql --out schema-sync.html
--source
: Source database connection string--target
: Target database connection string--sourceType
: Source DB type (postgres
ormysql
)--targetType
: Target DB type (postgres
ormysql
)--out
: Output HTML report file (default:schema-sync.html
)
Additional Options
--test
: Enable test mode (compare only limited number of objects)--limit <number>
: Number of objects to compare in test mode (default: 10)--title <text>
: Custom title to display in the HTML report
Full Example
dbtula \
--source "Host=localhost;Port=5432;Database=src;Username=postgres;Password=pass" \
--target "Server=localhost;Database=tgt;Uid=root;Pwd=pass;" \
--sourceType postgres \
--targetType mysql \
--out diff.html \
--title "Production vs QA Comparison" \
--test --limit 5
📝 All CLI Options
Option | Description |
---|---|
--source |
Source DB connection string |
--target |
Target DB connection string |
--sourceType |
postgres or mysql |
--targetType |
postgres or mysql |
--out |
Output HTML report file name (default: schema-sync.html ) |
--title |
Custom title for the report header |
--test |
Enable test mode (limits comparison to N objects) |
--limit <number> |
Number of objects to compare in test mode (default: 10) |
📚 Documentation
For advanced scenarios, API usage, and troubleshooting, see
GitHub Repository.
Related Packages
- B2A.DbTula.Core — Required abstraction & models
- B2A.DbTula.Infrastructure.MySql — MySQL provider
- B2A.DbTula.Infrastructure.Postgres — PostgreSQL provider
License
MIT License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.