dubnium-cli 1.1.52

dotnet tool install --global dubnium-cli --version 1.1.52
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dubnium-cli --version 1.1.52
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dubnium-cli&version=1.1.52
                    
nuke :add-package dubnium-cli --version 1.1.52
                    

Dubnium

CI

Dubnium 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.

What is Dubnium?

Dubnium is a .NET console application designed to solve the challenges of database version control and deployment. It enables development teams to:

  • Version Control Database Changes: Track every database modification with sequential version numbers
  • Automate Database Builds: Rebuild databases from scripts consistently across environments
  • Manage Migration Scripts: Execute database changes in the correct order with proper error handling
  • Compare Database Schemas: Identify differences between database versions and environments
  • Support Continuous Integration: Integrate seamlessly with CI/CD pipelines for automated deployments

Key Features

🗃️ Database Versioning

  • Maintains a version table in your database to track current state
  • Each database change is associated with a unique sequence number
  • Full audit trail of when and what changes were applied

📝 Script-Based Development

  • All database changes are made through migration scripts
  • Standardized file naming convention: SeqNo-BranchIdentity-Description.sql
  • Automatic validation of script structure and sequence numbers

🔄 Automated Database Builds

  • Restore from a baseline backup and apply all migration scripts
  • Consistent database builds across different environments
  • Support for both full rebuilds and incremental updates

🔍 Schema Comparison

  • Compare database schemas between different environments
  • Generate schema dumps for version control tracking
  • Identify schema drift and inconsistencies

🚀 CI/CD Integration

  • Command-line interface perfect for automation
  • Support for multiple database environments
  • Configurable through YAML configuration files

Available Commands

Information Commands

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

Project Commands

Command Alias Description Usage
init -i Initialize a new Dubnium project dbm init or dbm -i
setup Setup the database environment dbm setup

Execution Commands

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

Verification Commands

Command Alias Description Usage
verify -vf Verify command steps dbm verify or dbm -vf

Note: Commands marked as Paid require a commercial license subscription.

Getting Started

1. Installation

dotnet tool install --global dubnium-cli

2. Initialize Project

dbm init

This creates a dubnium.yml configuration file in your current directory.

3. Configure Database Connection

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

4. Configure Authentication (Optional)

For paid features, configure authentication:

  • Fill in your LicensedEmail and RegistrationCode in dubnium.yml

See Authentication Guide for detailed setup instructions.

5. Setup Database Environment

dbm setup

6. Create Your First Migration

dbm new "Initial database setup"

7. Deploy Changes

dbm deploy

Migration Script Structure

Migration scripts follow a specific naming convention:

014512-FeatureBranch-Updating_discount_calculation.sql

Format: {SeqNo}-{BranchIdentity}-{Description}.sql

  • SeqNo: Sequential number for ordering (6 digits)
  • BranchIdentity: Branch or feature identifier
  • Description: Human-readable description of changes

Configuration

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'

Data Dumping

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.

Development Workflow

For New Features

  1. Create a new branch
  2. Run dbm new "Feature description" to create migration script
  3. Write your database changes in the generated script
  4. Test with dbm deploy in your development environment
  5. Commit both the script and any schema changes

For Production Deployment

  1. Use dbm build to rebuild database from baseline (paid feature)
  2. Run dbm compare to verify schema consistency
  3. Deploy with confidence using dbm deploy

Architecture

Dubnium consists of several key components:

  • Dubnium.MSSQL: Core library containing database operations and business logic
  • dbm: Command-line interface for user interactions
  • Migration Engine: Handles script execution and version tracking
  • Schema Compare: Database schema comparison and validation
  • Configuration Management: YAML-based project configuration

Contributing

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.

Requirements

  • .NET 8.0 or later
  • SQL Server (2012 or later recommended)
  • Windows, Linux, or macOS

License

Licensed under the MIT License. See the license file for commercial licensing options for advanced features.

Installation

dotnet tool install --global dubnium-cli
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.

Version Downloads Last Updated
1.1.52 21 9/9/2025
1.1.51 27 9/9/2025
1.1.50 24 9/9/2025
1.1.49 46 9/8/2025
1.1.48 51 9/8/2025
1.1.47 137 8/12/2025
1.1.46 137 8/12/2025
1.1.45 129 8/12/2025
1.1.44 101 7/31/2025
1.1.43 97 7/29/2025
1.1.42 94 7/29/2025
1.1.41 95 7/29/2025
1.1.39 97 7/29/2025
1.1.38 97 7/29/2025
1.1.31 366 7/25/2025
1.1.30 445 7/24/2025
1.1.29 491 7/22/2025
1.1.23 484 7/22/2025
1.1.22 484 7/22/2025
1.1.21 484 7/22/2025
1.1.20 494 7/22/2025
1.1.19 492 7/22/2025
1.1.18 411 7/21/2025
1.1.17 407 7/21/2025
1.0.36 148 7/14/2025
1.0.34 138 7/14/2025