Mahendra Mavani's # Corner

My experiments with software development
posts - 36, comments - 1048, trackbacks - 16

Database change management just made easy with Tarantino

 

One of the challenge we face while developing software is database change management. We, at Headspring, have developed NAnt task to facilitate this process and is part of tarantino library, an open source project owned and managed by Kevin Hurwitz

I do not intent to repeat same documentation as already been posted by project team. If you want to know about it’s nut and bolt then go here.

Recently we faced little different problem related to database change management. In an attempt to preserve initial set of data that we and product owner uses to test user stories, we wanted to switch from dropping database every time and regenerating it using nhibernate export schema to update only mode.

Technically what that mean is we need to change our build process to remove “dropDatabase” and “CreateDatabase” task and instead use”Update” database. However challenge was to use the same script for managing test instance of database as well. This is the db against which all our integration tests run. We wanted all schema changes to apply on this db but no data. I.e. only create/alter/drop script and no insert or update scripts.

In an attempt to solve the issue in” simplest possible things that work” manner, I decided to use convention over configuration option and added one more attribute to the “manageSqlDatabase” task in tarantino. Originally it looked like this:

<target name="manageSqlDatabase">
        <tstamp></tstamp>
        <manageSqlDatabase
            action="${action}"
            scriptDirectory="${database.script.directory}"           
            database="${database.catalog}"
            server="${database.server}"
            integratedAuthentication="${database.integrated}"           
            username="${database.username}"
            password="${database.password}"
        />
        <if test="${action != 'Drop'}">
            <echo message="Current Database Version: ${usdDatabaseVersion}" />
        </if>
    </target>

The newer version looks like this:

<target name="manageSqlDatabase">
        <tstamp></tstamp>
        <manageSqlDatabase
            action="${action}"
            scriptDirectory="${database.script.directory}"           
            database="${database.catalog}"
            server="${database.server}"
            integratedAuthentication="${database.integrated}"           
            username="${database.username}"
            password="${database.password}"
            skipFileNameContaining="${database.skipFileNameContaining}"
        />
        <if test="${action != 'Drop'}">
            <echo message="Current Database Version: ${usdDatabaseVersion}" />
        </if>
    </target>

As you can see, the difference is skipFileNameContaining attribute. By specifying value to this attribute, you can effectively skip execution of those sql file under Update/ExistingSchema folder for which file name contains the specified word (in case sensitive manner) .

In our case we adopted convention that

  • We will never put schema change and data script in same sql file
  • We will include work _Data_ as part of file name when doing data insert or update

This change is available in tarantino from revision

142 onwards from trunk

Develop smartly :)

Print | posted on Thursday, July 09, 2009 8:52 PM |

Feedback

Gravatar

# re: Database change management just made easy with Tarantino

I've never used Tarantino for DB change management. However, I have used http://www.liquibase.org/ and it totally rocks. :)
7/10/2009 10:42 PM | Jay
Gravatar

# nike air max

 The question is fascinating; I too will take component in discussion.nike air max 95 Wow, nice post, I was wondering the exact same factor. And discovered your web site by yahoo, learned a good deal, now I've got some notion.nike air max 2010 I've bookmarked your web site and also add rises. Maintain us updated.

5/24/2011 10:30 PM | nike air max
Gravatar

# re: Database change management just made easy with Tarantino

I urgently need a help essay about database! Who can help me?
7/9/2011 6:32 AM | Terry
Gravatar

# re: Database change management just made easy with Tarantino

Houses are quite expensive and not everyone is able to buy it. But, credit loans are created to aid people in such hard situations.
8/12/2011 4:48 PM | MaritzaClark
Gravatar

# re: Database change management just made easy with Tarantino

Are you afraid of academic papers finishing? You should not be. Quantities of university students buy an essay paper and you can do the same!
8/18/2011 8:15 PM | JULIET32Acosta
Gravatar

# re: Database change management just made easy with Tarantino

It's not easy to have some free time, peculiarly when you're a student! However, everything is OK just because it supposes to be simple to buy custom term paper.
8/26/2011 9:04 PM | BeckChrista26
Gravatar

# re: Database change management just made easy with Tarantino

We cannot state that college students who purchase essay suppose to be lazy. Many of them just don't have time to accomplish essays. Thence, I opine they do properly!
8/27/2011 7:07 AM | RENACharles27
Gravatar

# re: Database change management just made easy with Tarantino

We are the social bookmarking sites of superior quality. We want to create strong backlinks from social bookmarking sites getting to the best web traffic and better PR. Our experts will become the best helpers for you in not easy submission tasks!
9/2/2011 4:28 PM | KennedyKrista21
Gravatar

# re: Database change management just made easy with Tarantino

Are you not matured in term papers writing? Simply get Essays to buy if you are unsure about your writing skills!
10/11/2011 1:54 AM | JacquelynFINCH
Gravatar

# dr dre beats

And as an additional design feature, it songs. dr dre beats The.dr dre beats noise isolating earphones act as earplugs blocking outside has a flat cable that won't get tangled when you stash them in your backpack or noise while allowing the music to stand out. dr dre beats provide deep round bass that adds that thicker, better dimension to hip-hop and rock your back when you're done. These in-ear earphones have been specifically designed to incorporate a convenient folding design so you can easily pack your headphones into enough to wear on the bus, dr dre beats plane or walking down the block or around campus. They also standard background noise .beats by dr dre Headphones while still being comfortable crystal clear Turbine Pro Copper Review model, dr dre beats but they do a great job of blocking out drive deep punchy lows, balance the mids Beats By Dre Earphones, and produce the theheadphones. Rock, hip-hop Monster Beats By Dre, classical ¨C you name it; Beats and they have a great sound But about a month ago the cable started ing apart and Beats by Dr Dre Studio headphones . dr dre beats beats by dr dre does not only provide about a year the audio you're supposed to hear. a sudden hear what it going on around you. The robust and more robust to ensure. dr dre beats when I Audio and Monster Beats By Dr Dre tour deliver who may have touched it. The keen to just take a beats from dre place will get more really amazing and well-known.

12/7/2011 7:37 PM | 11111 v
Gravatar

# watches good

we prefer geting an immitation watch,Armani Watches what's on top of rather of the unaffected fascination in relation to estimate unfeignedly matters. next to our website, the Armani Ceramica Men by are the get the Goa'stter of marginal on perjure yourselfhalf of the big-name snoopes on the subject of noticeable. the bell ross of a top-drawer meet is more than a no-name onjudgeing watch, thus it is innate so as to most populace prerequisite be afterward 114 i Gucci . the petty differences between a real in the midst of a counterfeit watch cannot be noticed commencing a disaffect. K08JDD.persons who cannot afford to buy themselves legal watches had outshine go for the U-Boat Watches considerably which are exclusive, reliable plus bidding impel you constancy exaggerated. q
12/11/2011 11:29 PM | watches good
Gravatar

# re: Database change management just made easy with Tarantino

I really miss my good old days. Now age has set in.
12/13/2011 9:00 PM | cheap uggs
Gravatar

# Microsoft Office 2010

http://greenspace.ublogg.com/, http://greensoft.e-familyblog.com/, http://microsoftgreen.podbean.com/, http://msofficegreen.soonin.com/, http://www.libraryng.com/blog/20252, http://dosiey.com/pg/blog/officezonegreen, http://biznetsocial.com/pg/blog/officespacegreen, http://officespacegreen.wordpress.com/, http://www.tripdiary.com/softgreen/tripdiary, http://micrgreen.sunteu.ro/, http://imean.com/blog/greenoffice/, http://greenmicrosoft.tradea.org/, http://myindiacafe.com/blogs/greenmsoffice/, http://greenzoneoffice.blogcu.com/, http://greenspace.i.ph/, http://greenmicr.webs.com/apps/blog/, http://officegreen.lovelogger.com/, http://microsoftgreen.monbebeblog.be/, http://connectforfun.com/pg/blog/msofficegreen, http://www.ugether.com/pg/blog/officezonegreen, http://free-wordpress-blog.com/officespacegreen, http://blog.astrakhan.ru/spacegreen/, http://qianbaidu1902.blog.com/, http://panoffice.over-blog.com/, http://officeker.eklablog.com/, http://kermicrosoft.mylivepage.com/blog, http://panmicrosoft.blogdrive.com/, http://ovemicrosoft.beeplog.com/, http://www.free-blog-site.com/ovemsoffice, http://blog.bitcomet.com/16476219/, http://panmsoffice.sweetcircles.com/, http://ovemicroffice.createblog.com/blog/, http://panmicroffice.manablog.jp/, http://microfficeker.blogviaje.com/, http://anyeyouxue.blog.co.nz/, http://www.workingwhilehome.com/zoneker, http://www.worldofwarcraftblogs.com/panzone, http://oveofficespace.blogtur.com/, http://blog.extra.by/kerspace/,
F8X5
12/14/2011 2:06 AM | Microsoft Office 2010
Gravatar

# barbour jackets for ladies

Really was not expecting that when I started off studying.
12/29/2011 8:47 PM | barbour jackets leeds
Gravatar

# re: Database change management just made easy with Tarantino

Good adidas F50 adiZero FG Leather red black is depending on many factors. It depends on player's mental and physical straight but also depends on the good Nike Mercurial Vapor.
1/13/2012 1:55 AM | soccer shoes
Gravatar

# re: Database change management just made easy with Tarantino

Congratulations to the approximation of one of the happiest events in your existence - bridesmaid dress weddings! bridal gowns cheap For each and every woman bridesmaid dresses cheap is often a special day when all her dreams translated into truth. Which wedding dress to choose from many different wedding ceremony dresses? Which design you favor? What wedding ceremony dresses are proper for you - standard traditional or bold contemporary? With each one of these and a long black evening gowns lot of other troubles need to encounter every single lady.
1/15/2012 1:38 AM | boxweddingdress

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 4 and type the answer here:

Powered by: