I am a build engineer and responsible for our source control layout. We need to keep a version of all database objects and also group changes together with rollback scripts for pushes to production. We have development, QA, and Production environments and there are different versions of the database objects in each. One area we have trouble is with table creates vs alters. Developers will check in alters but to recreate the database we need the creates. Any ideas would be appreciated.
What is SQL Scripts? A SQL script is a set of SQL commands saved as a file in SQL Scripts. A SQL script can contain one or more SQL statements or PL/SQL blocks. You can use SQL Scripts to create, edit, view, run, and delete script files.
For storing the repository contents, Subversion uses its own FSFS database. It's not a database in the relational database sense. It's a filesystem-based method of storing repository contents. For some server-side functionality, and for storing working copy metadata on the client end, it uses SQLite.
Click Query > Connection > Connect to connect to the server that contains the database you want to access. Select the appropriate StarTeam Server database. Open the tuning script, by choosing File > Open > foldername\scriptname. Execute the script, by clicking the Execute button on the toolbar or by pressing F5.
I'm a huge fan of http://www.liquibase.org/. It allows you to track versions of your database, including the ability to "update" and "rollback" your schema/data.
They have a nice XML syntax that has baked in support for common refactorings, including ones detailed in http://databaserefactoring.com/
They also have Eclipse plugins to help create the change scripts, and ant task's for integrating into your build.
My only complaint is that it is Java based and I'm fond of installing java on my build server for .NET projects. In that case I've heard good things about http://code.google.com/p/migratordotnet/.
You should look into how frameworks like rails handle migrations
http://dizzy.co.uk/ruby_on_rails/cheatsheets/rails-migrations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With