Recipe 9Re-Creating Your Application Database for Any Build

Problem: How do you re-create your database for any build?

When database creation scripts haven't been put under version control, confusion and frustration about which database version goes with which application build always result. A request such as "Give me a database that works with build 1867 of the application" should be easy to carry out.

Solution

When all the database creation scripts have been tagged in the source control, you simply have to check out the database creation scripts from version control by the tag for the application build, and then you can run the Ant target DBInit. This target creates the database based on the database scripts as they existed when the application ...

Get Recipes for Continuous Database Integration: Evolutionary Database Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.