Project Description
This project is used to manage database projects. Starting with a baseline update scripts are automatically applied in sequence to reach a final database. In addition, the tool can output update scripts rather than apply them directly to the db.
Useful links
http://www.deepcode.co.uk/2008/06/database-schema-in-source-control.html - the original blog post.
http://www.deepcode.co.uk/2008/07/database-schema-and-source-control.html - blog post on using the tools
Basic usage
To use the command line tool, use the following arguments;
Deepcode.SchemaTool.Cmd.exe - followed by;
-h Display usage information
-l [location] The location of your database project
-m [dbscript] Specify db to run in database update mode - scripts will be applied to the database specified. Specify script to generate scripts to create the entire database and to patch it.
When running in database update mode (-m db), use these additional arguments;
-s [server] The SQL Server to target (default to (local))
-d [database] The database to target
-id [databaseid] The id of the database in the DatabaseVersion tracking table.
-c If present, instructs the engine to create the database if it doesn't exist.
-cd If present, instructs the engine to create the database. If it exists already, it will first be dropped.
-u [username] The SQL username to login to the server as - if not present the system will use windows authentication as the current windows identity.
-p [password] The password to connect to SQL server, when -u is being specified
-rd [referenceData] = If present, will instruct the engine to run the reference data script
-td [testData] = If present, will instruct the engine to run the test data script
When running in script generation mode (-m script), use these arguments;
-o [location] The location to store the generated SQL scripts.
See http://dbnet.codeplex.com/documentation for detailed documentation