Apr 16

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

Tag: , , warren @ 2:26 pm

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)

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

  1. werutzb says:

    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

  2. warren says:

    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.

  3. KASYESTUATA says:

    Hello

    As newly registered user i only want to say hi to everyone else who uses this site B-)

  4. WQ says:

    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

  5. warren says:

    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” )

  6. WQ says:

    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.

Leave a Reply