Execution Commands
Execution commands handle the core database operations including creating scripts, building, deploying, and comparing schemas. Some commands are free while others require a commercial license.
new
Create a new migration script file.
Alias: -n
License: Free
Usage:
dbm new
# or
dbm -n
Description:
Creates a new migration script file with the proper naming convention in your configured migration path. The file follows the pattern: SeqNo-BranchIdentity-Description.sql.
Prerequisites:
- Valid
dubnium.ymlconfiguration file MigrationPathconfigured and directory exists
build
Build the database project. [Paid Feature]
Alias: -b
License: Paid
Usage:
dbm build
# or
dbm -b
Description: Executes all migration scripts in sequence to build or update the database. This command processes scripts in the correct order based on their sequence numbers and applies them to the target database.
Prerequisites:
- Valid commercial license configured in
dubnium.yml - Database environment set up with
dbm setup - Migration scripts in the configured
MigrationPath
Features:
- Sequential script execution
- Transaction wrapping for each script
- Error handling with rollback capability
- Version tracking and history
deploy
Deploy migration scripts to the database. [Paid Feature]
License: Paid
Usage:
dbm deploy
Description: Deploys pending migration scripts to the configured database. Similar to build but focuses on deploying only new/pending changes rather than rebuilding the entire database.
Prerequisites:
- Valid commercial license configured in
dubnium.yml - Database environment set up with
dbm setup
compare
Compare database schemas.
Alias: -c
License: Free
Usage:
dbm compare
# or
dbm -c
Description: Compares the schema of your database with a reference schema, identifying differences in tables, views, stored procedures, and other database objects.
Prerequisites:
- Valid
dubnium.ymlconfiguration file - Database connections configured
shift
Shift script files. [Paid Feature]
License: Paid
Usage:
dbm shift
Description: Manages and reorganizes migration script files, allowing you to reorder or restructure your migration sequence when needed.
Prerequisites:
- Valid commercial license configured in
dubnium.yml - Migration scripts in the configured path
clean
Delete temporary files.
Alias: -x
License: Free
Usage:
dbm clean
# or
dbm -x
Description:
Removes temporary files created during Dubnium operations. This includes build artifacts, temporary schema files, and other intermediate files stored in the configured TempPath.
Prerequisites:
- Valid
dubnium.ymlconfiguration file withTempPathconfigured
What it cleans:
- Temporary build files
- Schema comparison artifacts
- Log files (if configured)
- Data dump temporary files
setsource
Set source schema for comparisons.
Alias: -ss
License: Free
Usage:
dbm setsource
# or
dbm -ss
Description: Establishes a reference schema that will be used as the baseline for schema comparisons. This is typically used to set a "golden" schema that other environments will be compared against.
Prerequisites:
- Valid
dubnium.ymlconfiguration file - Database connection configured
compareone
Compare database one with database two.
Alias: -c1
License: Free
Usage:
dbm compareone
# or
dbm -c1
Description:
Performs a schema comparison between the primary database (DatabaseOne) and secondary database (DatabaseTwo) configured in your dubnium.yml file.
Prerequisites:
- Valid
dubnium.ymlconfiguration file - Both
DatabaseOneandDatabaseTwoconnections configured
Output:
- Schema differences report
- Missing objects in each database
- Structural differences in existing objects
comparetwo
Compare database two with source schema.
Alias: -c2
License: Free
Usage:
dbm comparetwo
# or
dbm -c2
Description:
Compares the secondary database (DatabaseTwo) with the established source schema set by the setsource command.
Prerequisites:
- Valid
dubnium.ymlconfiguration file DatabaseTwoconnection configured- Source schema established with
dbm setsource
dumpdata
Dump data from specified tables to CSV files.
Alias: -dd
License: Free
Usage:
dbm dumpdata
# or
dbm -dd
Description:
Exports data from tables specified in the TablesToDump configuration to CSV files. This is useful for backing up reference data or migrating data between environments.
Prerequisites:
- Valid
dubnium.ymlconfiguration file - Database connection configured
TablesToDumplist configured with table names
Configuration Example:
TablesToDump:
- 'Users'
- 'Products'
- 'Orders'
- 'Categories'
Output:
- CSV files created in
{TempPath}/DataDump/directory - Files named as
data-{TableName}.csv - Headers included in CSV files
Example Output Files:
c:\temp\DataDump\data-Users.csv
c:\temp\DataDump\data-Products.csv
c:\temp\DataDump\data-Orders.csv