dubnium-cli 1.1.23

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dubnium-cli --version 1.1.23
                    
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.23
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dubnium-cli&version=1.1.23
                    
nuke :add-package dubnium-cli --version 1.1.23
                    

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

Command Description Usage
version Display the version of Dubnium dbm version
init Initialize a new Dubnium project dbm init
setup Setup the database environment dbm setup
new Create a new migration script file dbm new "Description"
deploy Deploy migration scripts to database dbm deploy
dbversion Show current database version dbm dbversion
compare Compare database schema dbm compare
help List all available commands dbm help

Note: Some advanced features like Build, Shift, and automated schema dumps require a paid license.

Getting Started

1. Installation

dotnet tool install --global Dubnium

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

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.

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 108 9/9/2025
1.1.51 104 9/9/2025
1.1.50 101 9/9/2025
1.1.49 120 9/8/2025
1.1.48 122 9/8/2025
1.1.47 140 8/12/2025
1.1.46 139 8/12/2025
1.1.45 131 8/12/2025
1.1.44 102 7/31/2025
1.1.43 98 7/29/2025
1.1.42 95 7/29/2025
1.1.41 96 7/29/2025
1.1.39 99 7/29/2025
1.1.38 98 7/29/2025
1.1.31 368 7/25/2025
1.1.30 462 7/24/2025
1.1.29 510 7/22/2025
1.1.23 506 7/22/2025
1.1.22 504 7/22/2025
1.1.21 506 7/22/2025
1.1.20 502 7/22/2025
1.1.19 499 7/22/2025
1.1.18 415 7/21/2025
1.1.17 412 7/21/2025
1.0.36 151 7/14/2025
1.0.34 140 7/14/2025