The problem it solves
On most projects, database change is managed through a mixture of manual scripts, shared folders and individual memory. Nobody can say with certainty which changes have been applied to which environment, what must run next, or whether test and production are structurally the same. Releases carry avoidable risk, and the risk grows with the age of the system.
Dubnium brings database change into the same disciplined, version-controlled workflow as the rest of the application.
What it does
- Versioned migration scripts. Each change is a numbered
.sqlfile in a migration folder committed alongside the application code. - Deployment tracking. A tracking table in the target database records what has been applied, so a deployment runs only the pending scripts, in order.
- Schema comparison. Extract the live schema from a database and diff it against a saved baseline or against another database. Compare source to environment one, source to environment two, or one to two.
- Variable substitution.
{{UPPER_SNAKE_CASE}}placeholders in scripts are resolved from configuration at deploy time, so one script set serves every environment. - Dry run. Simulate every operation without executing it.
- Skip rules. Exclude tables, procedures and other objects from comparison by name or pattern.
Commands
| Command | Purpose |
|---|---|
init |
Scaffold a dubnium.yml for a new project |
setup |
Prepare the environment and tracking table |
dbversion |
Show the database's current version |
new |
Create a new numbered script file |
build |
Build the database project |
deploy |
Apply pending scripts to the target database |
compare, compareone, comparetwo |
Compare schemas between source and environments |
setsource |
Save the current schema as the source baseline |
shift |
Re-sequence script files |
test |
Test database connections |
clean |
Remove temporary files |
Build, deploy and shift require a subscription. The remaining commands are free to use.
Configuration
ProjectName: 'MyProject'
MigrationPath: 'Migration'
DatabaseOne:
ConnectionString: 'Server=...;Database=...;'
Name: 'PROD'
DatabaseTwo:
ConnectionString: ''
Name: 'DEV'
SchemaPath: 'Schema'
DryRun: false
Variables:
SCHEMA_NAME: 'dbo'
Getting it
Dubnium is published on NuGet as Booolean.Dubnium.MSSQL. We use it on every Booolean engagement with a SQL Server database, including inside CI/CD pipelines, so a release deploys the application and its database change together.
For licensing, a demonstration or help bringing an existing database under version control, get in touch.