quino migrate
Examples
The following commmand launches an interactive command-line UI to detect changes to the schema for the ProductApplication
in the target database. if there are multiple database configurations in src/database-configuration.xml
, then the utility asks the user to choose one.
quino migrate -i out/Product.Core.dll -c src/data-configuration.xml -a ProductApplication
The following command is the same as above, but selects the Testing
configuration from src/database-configuration.xml
.
quino migrate -i out/Product.Core.dll -c src/data-configuration.xml -a ProductApplication -d Testing
Use the migrate
switch to automatically migrate without user intervention:
quino migrate -i out/Product.Core.dll -c src/data-configuration.xml -a ProductApplication -d Testing --migrate
Use the check
switch to return an exit code indicating whether a migration is necessary. This is useful in CI scenarios to determine whether a side-by-side nightly build using the production database can be deployed.
quino migrate -i out/Product.Core.dll -c src/data-configuration.xml -a ProductApplication -d Testing --check
Purpose
Quino products include a model. While many products integrate schema-migration directly (e.g. console-based or headless in web servers), there is still a need for a standalone schema tool.
For example, an automated deployment may want to check whether a database is up-to-date with the application model before installing the product.
The same deployment may want to automatically upgrade the database without integrating schema-migration into the product itself.
Instead of automatic migration, the deployment team may want to run the migration manually—or instead generate the migration SQL for handoff to a DBA team.
Function
Anyone can use this tool to check and/or migration a database schema. The tool allows the caller to select a configuration file from which to load database configurations and also to select an application for which to load a model.
Command line
The command can be controlled with the following additional parameters.
Name | Values/Example | Description |
---|---|---|
-h , --help |
Shows the full command-line help | |
-i , --input |
../out/Sandbox.Core.dll |
Path and filename of the assembly containing application |
-a , --application |
Sandbox |
The name of the application |
-c , --config |
.\data-configuration.xml |
Path and filename of the configuration file |
-d , --database |
Testing |
The name of the database connection settings (must be in the file) |
--check |
Generates an exit code and output describing the state of the schema | |
--migrate |
Triggers an automatic migration |
If the application
parameter is omitted, the tool will let the user choose from the applications available in the input
assembly. Likewise, if the database
parameter is omitted, the tool will let the user choose from the connection settings available in the config
file.