dubnium-cli 1.1.94

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.94
                    
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.94
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dubnium-cli&version=1.1.94
                    
nuke :add-package dubnium-cli --version 1.1.94
                    

Dubnium

Dubnium is a database versioning and migration tool for SQL Server. You write numbered SQL scripts, Dubnium runs the ones a database has not seen yet, records what it ran, and can compare the schema of two databases to find drift.

It installs as a .NET global tool and is driven by the dbm command.

Use at your own risk. Dubnium changes database schemas and data. It is provided "as is", without warranty, and the owner accepts no responsibility for damage, data loss, or misleading output, whether you use free commands or a paid subscription. It is not recommended for any live or production environment unless you have a current, tested backup. See LICENSE.

What it does

  • Versioned migrations. Each script has a sequence number. Dubnium keeps a __DubniumInfo table in every database and runs only the scripts above the recorded version.
  • Named database targets. One configuration file describes every environment (local, staging, production). Each command names the target it acts on.
  • Schema comparison. Dump the tables, views, triggers and stored procedures of two databases and report the differences, with an HTML diff.
  • Reference data and settings. Dump tables to CSV, or dump settings one file per row, review them in source control, and promote them to another database.
  • Schema documentation. Generate a Markdown and PDF description of every table.
  • CI friendly. Plain command line, exit code 0 on success and 1 on failure (including when compare finds differences).

Requirements

  • .NET 10 runtime or later
  • SQL Server 2017 or later
  • Windows, Linux or macOS. The PDF output of schemadoc currently works on Windows only.

Getting started

1. Install

dotnet tool install --global dubnium-cli

2. Create a project

dbm init

This writes a dubnium.yml in the current folder. Set ProjectName and describe your databases:

ConfigurationVersion: 2
ProjectName: 'MyProject'
MigrationPath: 'Migration'
SchemaPath: 'Schema'
Databases:
  - Key: 'development'
    Name: 'Development'
    Connection:
      Source: EnvironmentVariable
      Value: 'MYAPP_DEVELOPMENT_CONNECTION_STRING'

3. Prepare the database

dbm setup development

Creates the __DubniumInfo version table and the Platform, Generated and Application script folders.

4. Write a migration

dbm new Add customer table

Creates Migration/Application/100000 - Add_customer_table.sql. Put your SQL in it. Use GO on its own line to separate batches.

5. Deploy

dbm deploy development

deploy requires a subscription; see Licensing.

Commands

Commands that act on a database take the target Key from dubnium.yml as their first argument. Run dbm help for the list built into your installed version.

Information

Command Alias Description
version -v Show the Dubnium version
versiondb <key> -vdb Show the migration version recorded in a database
help -h List all commands
test -t Test the connection to every configured database
update -u Show the command that updates the tool

Project

Command Alias Description
init -i Create a dubnium.yml in the current folder
setup <key> Create the version table and script folders
verify -vf Check credentials, connections, folders and script names

Execution

Command Alias Description Licence
new <description> -n Create the next numbered script. Add --platform or --generated to choose the script type Free
deploy <key> Run the scripts the database has not seen yet Subscription
build <key> -b Same as deploy Subscription
compare <source key> <target key> -c Compare the schema of two databases Free
setsource <key> -ss Write the schema of a database to SchemaPath for source control Free
dumpdata <key> [tables] -dd Export tables to CSV Free
settingdump <key> -sd Export setting tables, one file per row Free
settingdeploy <key> -sdp Apply dumped settings to a database Free
schemadoc <key> -sdoc Write schema documentation as Markdown and PDF Free
backup <key> -bk Back up a database (the file is written on the SQL Server machine) Free
clean -x Delete temporary comparison sessions Free

Migration scripts

Script files are named:

<sequence number> - <description>.sql

For example 100000 - Add_customer_table.sql. The description is 10 to 90 characters of letters, digits, spaces, - or _. dbm new picks the next number for you.

Scripts live in three folders under MigrationPath, deployed in this order, each with its own number sequence:

Folder Purpose
Platform Shared or framework objects
Generated Scripts produced by tooling
Application Your application's changes

Things to know before you rely on it:

  • A script's batches run in order on one connection. They are not wrapped in a transaction. If a script fails part-way, the earlier batches stay applied and the script is not recorded, so write scripts that are safe to run again (IF NOT EXISTS ...).
  • Only objects in the dbo schema are included in compare, setsource and schemadoc.
  • {{NAME}} placeholders are replaced with values from the Variables section of dubnium.yml. See Examples/VARIABLES_DOCUMENTATION.md.

Configuration

ConfigurationVersion: 2
ProjectName: 'Your Project Name'
MigrationPath: 'Migration'           # Folder containing the script type folders
SchemaPath: 'Schema'                 # Where 'setsource' writes the schema
TempPath: 'Temp'                     # Comparison sessions, reports and logs
Verbose: false                       # Detailed logging
DryRun: false                        # Show what would happen without changing anything
CommandTimeoutSeconds: 300           # Limit for one migration batch or backup
OpenNewScriptFile: false             # Open scripts created by 'dbm new'
RerunScriptTypes: []                 # Script types to run again even when already deployed

Databases:
  - Key: 'development'
    Name: 'Development'
    Connection:
      Source: EnvironmentVariable
      Value: 'MYAPP_DEVELOPMENT_CONNECTION_STRING'
  - Key: 'staging'
    Name: 'Staging'
    Connection:
      Source: CryptexFile
      Value: 'Config/staging.connection.enc'

Registration:                        # Only needed for subscription commands
  LicensedEmail: ''
  RegistrationCode: ''

DataMigration:
  Folder: 'DataDump'                 # Where 'dumpdata' writes <Table>.csv
  Tables:
    - 'Country'
    - 'Currency'

Relative paths are resolved from the folder that holds dubnium.yml. Keys and display names must be unique.

Connection sources

Source Value holds Use it for
EnvironmentVariable The name of an environment variable CI and shared configuration files
CryptexFile The path of an encrypted file; needs CRYPTEX_PASSPHRASE and the cryptex command Encrypted secrets kept in the repository
Inline The connection string itself A local configuration file that is not committed

Never commit a dubnium.yml that contains an inline connection string or a registration code. Use EnvironmentVariable for anything shared.

Licensing

Dubnium is proprietary software. You may install it with dotnet tool install --global dubnium-cli and use it under the terms in LICENSE. Commands fall into three tiers:

Tier What you need Commands today
Free Nothing Every command not listed below
Registered A registered Dubnium account None at present
Paid A registered account with an active subscription deploy, build (and shift, in development)

The tier of a command can change between versions; dbm help and the documentation show the current tiers.

For registered and paid commands, put your licensed email and registration code under Registration in dubnium.yml, or better, in a local configuration file that is not committed. These commands contact the licence service each time they run, so they need internet access.

Whichever tier you use, the software comes with no warranty and the owner accepts no liability for any damage it causes. Back up before you deploy, and try every deployment outside production first.

Use in CI

dotnet tool install --global dubnium-cli
dbm deploy staging
dbm compare development staging

Supply connection strings through environment variables. A non-zero exit code fails the step.

Repository layout

  • Dubnium.MSSQL - core library: configuration, migration engine, schema comparison
  • Dubnium - the dbm command-line tool
  • Dubnium.WebAdapter - experimental ASP.NET host for running commands from a browser. It has no sign-in of its own and answers only local requests; do not expose it without adding authentication.
  • Dubnium.Tests - unit tests
  • Docs - documentation site source
  • Examples - sample configuration and scripts

Licence and terms of use

Copyright (c) 2025 Bala Booolean. All rights reserved. Use is governed by LICENSE, which covers the free, registered and paid tiers, the restrictions on redistribution, and the disclaimer of warranty and liability.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.96 142 10/2/2026
1.1.95 90 10/2/2026
1.1.94 98 10/1/2026
1.1.93 108 9/21/2026
1.1.92 101 9/21/2026
1.1.91 99 9/21/2026
1.1.89 134 8/18/2026
1.1.87 131 8/10/2026
1.1.86 120 8/9/2026
1.1.85 110 8/8/2026
1.1.84 112 8/8/2026
1.1.83 113 8/8/2026
1.1.81 154 6/11/2026
1.1.80 132 6/5/2026
1.1.79 165 6/4/2026
1.1.78 140 5/15/2026
1.1.77 134 5/15/2026
1.1.76 136 5/14/2026
1.1.75 139 5/8/2026
1.1.74 122 5/8/2026
Loading failed