Configuration
Dubnium uses a YAML configuration file (dubnium.yml) for project settings. This file must be present in your project directory for most commands to function properly.
Configuration File Structure
Basic Configuration
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
- 'Users'
- 'Products'
- 'Orders'
Complete Configuration Example
ProjectName: 'MyApplication Database'
MigrationPath: 'database/migrations'
# Primary database configuration
DatabaseOne:
ConnectionString: 'Server=localhost;Database=MyApp_Dev;Integrated Security=true;TrustServerCertificate=true'
Name: 'Development Database'
# Secondary database (optional) - useful for comparisons
DatabaseTwo:
ConnectionString: 'Server=prod-server;Database=MyApp_Prod;User Id=dbuser;Password=securepass;TrustServerCertificate=true'
Name: 'Production Database'
# Licensing for paid features
Registration:
LicensedEmail: 'your-email@company.com'
RegistrationCode: 'your-registration-code-here'
# File system paths
TempPath: 'c:\temp\dubnium\'
MigrationPath: 'database\migrations'
# Output and logging
Verbose: true
# Data export configuration
TablesToDump:
- 'Users'
- 'Roles'
- 'Permissions'
- 'Settings'
- 'Categories'
- 'Products'
Configuration Sections
ProjectName
Type: String
Required: Yes
Description: A descriptive name for your database project.
MigrationPath
Type: String
Required: Yes
Default: 'Migration'
Description: Path to the directory containing your SQL migration scripts. Can be relative or absolute.
DatabaseOne
Type: Object
Required: Yes
Description: Primary database connection configuration.
DatabaseOne.ConnectionString
Type: String
Required: Yes
Description: SQL Server connection string for the primary database.
Examples:
# Windows Authentication
ConnectionString: 'Server=localhost;Database=MyDB;Integrated Security=true;TrustServerCertificate=true'
# SQL Server Authentication
ConnectionString: 'Server=myserver;Database=MyDB;User Id=username;Password=password;TrustServerCertificate=true'
# Azure SQL Database
ConnectionString: 'Server=tcp:myserver.database.windows.net,1433;Initial Catalog=MyDB;User ID=username;Password=password;Encrypt=True;TrustServerCertificate=False;'
DatabaseOne.Name
Type: String
Required: Yes
Description: Friendly name for the database (used in logging and reports).
DatabaseTwo
Type: Object
Required: No
Description: Optional secondary database for comparison operations.
Structure is identical to DatabaseOne. Used by commands like compareone and comparetwo.
Registration
Type: Object
Required: For paid features
Description: Licensing information for commercial features.
Registration.LicensedEmail
Type: String
Required: For paid features
Description: Email address associated with your Dubnium license.
Registration.RegistrationCode
Type: String
Required: For paid features
Description: Registration code provided with your commercial license.
TempPath
Type: String
Required: Yes
Default: 'c:\temp'
Description: Directory for temporary files created during operations.
Notes:
- Directory will be created if it doesn't exist
- Must have write permissions
- Used for schema comparison artifacts, data dumps, and build files
Verbose
Type: Boolean
Required: No
Default: false
Description: Enable detailed logging output for troubleshooting.
TablesToDump
Type: Array of Strings
Required: For dumpdata command
Description: List of table names to export when using the dumpdata command.
Example:
TablesToDump:
- 'Users'
- 'Products'
- 'Categories'
- 'Orders'
- 'OrderItems'
Environment-Specific Configurations
You can maintain separate configuration files for different environments:
Development (dubnium-dev.yml)
ProjectName: 'MyApp Development'
DatabaseOne:
ConnectionString: 'Server=dev-server;Database=MyApp_Dev;Integrated Security=true;'
Name: 'Development'
TempPath: 'c:\temp\dubnium-dev\'
Verbose: true
Production (dubnium-prod.yml)
ProjectName: 'MyApp Production'
DatabaseOne:
ConnectionString: 'Server=prod-server;Database=MyApp_Prod;User Id=produser;Password=securepass;'
Name: 'Production'
TempPath: 'c:\temp\dubnium-prod\'
Verbose: false
Registration:
LicensedEmail: 'admin@company.com'
RegistrationCode: 'prod-license-code'
Best Practices
Security
- Never commit passwords to version control
- Use environment variables for sensitive data
- Consider using Windows Authentication when possible
- Store production configurations separately
Organization
- Use descriptive names for databases and projects
- Organize migration scripts in a clear directory structure
- Keep temporary paths separate for different environments
Validation
- Run
dbm verifyto validate your configuration - Test database connections with
dbm test - Use verbose logging during development and troubleshooting