Dubnium is a powerful database versioning and migration tool for SQL Server that provides automated database builds with comprehensive versioning capabilities.
$ dotnet add package dubnium-cliDubnium is a powerful database versioning and migration tool for SQL Server that provides automated database builds with comprehensive versioning capabilities. It streamlines database development workflows by ensuring consistent, traceable, and reversible database changes across Development, Testing, and Production environments.
Dubnium is a .NET console application designed to solve the challenges of database version control and deployment. It enables development teams to:
SeqNo-BranchIdentity-Description.sql| Command | Alias | Description | Usage |
|---|---|---|---|
version | -v | Display the version of Dubnium | dbm version or dbm -v |
versiondb | -v1 | Show current database version | dbm versiondb or dbm -v1 |
versiondbtwo | -v2 | Show second database version | dbm versiondbtwo or dbm -v2 |
help | -h | List all available commands | dbm help or dbm -h |
test | -t | Test database connections | dbm test or dbm -t |
| Command | Alias | Description | Usage |
|---|---|---|---|
init | -i | Initialize a new Dubnium project | dbm init or dbm -i |
setup | Setup the database environment | dbm setup |
| Command | Alias | Description | Usage | License |
|---|---|---|---|---|
new | -n | Create a new migration script file | dbm new "Description" or dbm -n "Description" | Free |
deploy | Deploy migration scripts to database | dbm deploy | Paid | |
build | -b | Build the database project | dbm build or dbm -b | Paid |
compare | -c | Compare database schema | dbm compare or dbm -c | Free |
shift | Shift script files | dbm shift | Paid | |
clean | -x | Delete temporary files | dbm clean or dbm -x | Free |
setsource | -ss | Set source schema | dbm setsource or dbm -ss | Free |
compareone | -c1 | Compare database one with database two | dbm compareone or dbm -c1 | Free |
comparetwo | -c2 | Compare database two with source | dbm comparetwo or dbm -c2 | Free |
dumpdata | -dd | Dump data from specified tables to CSV files | dbm dumpdata or dbm -dd | Free |
| Command | Alias | Description | Usage |
|---|---|---|---|
verify | -vf | Verify command steps | dbm verify or dbm -vf |
Note: Commands marked as Paid require a commercial license subscription.
dotnet tool install --global dubnium-cli
dbm init
This creates a dubnium.yml configuration file in your current directory.
Edit the dubnium.yml file with your database connection details:
ProjectName: 'MyProject'
MigrationPath: 'Migration'
DatabaseOne:
ConnectionString: 'Server=localhost;Database=MyDB;Integrated Security=true;'
Name: 'MyDatabase'
Registration:
LicensedEmail: ''
RegistrationCode: ''
TempPath: 'c:\temp\'
Verbose: false
For paid features, configure authentication:
dubnium.ymlSee Authentication Guide for detailed setup instructions.
dbm setup
dbm new "Initial database setup"
dbm deploy
Migration scripts follow a specific naming convention:
014512-FeatureBranch-Updating_discount_calculation.sql
Format: {SeqNo}-{BranchIdentity}-{Description}.sql
Dubnium uses a YAML configuration file (dubnium.yml) for project settings:
ProjectName: 'Your Project Name'
MigrationPath: 'Migration' # Folder containing migration scripts
DatabaseOne:
ConnectionString: 'your-connection-string'
Name: 'DatabaseName'
DatabaseTwo: # Optional second database for comparisons
ConnectionString: ''
Name: ''
TempPath: 'c:\temp\' # Temporary files location
Verbose: false # Enable detailed logging
TablesToDump: # List of tables to dump data from (for dumpdata command)
- 'Users'
- 'Products'
- 'Orders'
The dumpdata command allows you to export table data to CSV files. Configure the tables to export by adding them to the TablesToDump list in your dubnium.yml file:
dbm dumpdata # Export data from all tables listed in TablesToDump
dbm dd # Short alias for dumpdata
Data files are exported to CSV format in the {TempPath}/DataDump/ directory with the naming pattern data-{TableName}.csv.
dbm new "Feature description" to create migration scriptdbm deploy in your development environmentdbm build to rebuild database from baseline (paid feature)dbm compare to verify schema consistencydbm deployDubnium consists of several key components:
This project is designed for database development teams who need reliable, automated database versioning. While the core features are available for free, advanced features require a commercial license.
Licensed under the MIT License. See the license file for commercial licensing options for advanced features.
dotnet tool install --global dubnium-cli