Agile Database – Part 4: MIGRATEdb (a solution to the release problem)

Go here for the other posts in this series.

MIGRATEdb will parse an XML file of database changes and load them to the targeted database if they are not already there.

A database change consists of a test to determine whether the change has already been applied and a set of change actions.

The tool works from the command line and also as an Ant target. For a simple start we have an Ant script that includes targets for:

  • user.xml = create the application user (this will be executed by an existing ‘power’ user with the permissions to create a schema/user)
  • db.xml = all application creation SQL
  • drop.xml = drop (cascade) the application user (I expect this would only be used in my development sandbox)
Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

6 thoughts on “Agile Database – Part 4: MIGRATEdb (a solution to the release problem)

  1. werutzb

    Hi!

    I want to improve my SQL capabilities.
    I red that many SQL books and want to
    read more about SQL for my work as mysql database manager.

    What can you recommend?

    Thanks,
    Werutz

    Reply
  2. warren Post author

    I am not a MySQL specialist. I would have a look at a few books in my local bookstore, or type Mysql into Amazon and read about what comes up.

    Reply
  3. WQ

    Warren, I’d like to call a sql script , see cr_table.sql, instead of put the DDL statement in the migrateDB xml file, do you know how this could be done? Thanks

    Reply
  4. warren Post author

    I have just implemented a file option – sqlaction file=”cr_table.sql” . The file could contain many SQL statements which would be finished by ‘;’ and/or a new line with ‘/’.

    This should be available in version 0.6 which I will put up in the next couple of days after I do some more testing. (It would also work for tests – sqltest file=”sometest.sql” )

    Reply
  5. WQ

    Warren,

    That’s great news. I’m working on a project that try to use this tool. I can help on testing the file option if that could help. I’m really looking forward to it the sooner the better and now is the best.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *