LDSTechForumProjects

Upgrading a DB Migrator Project

There are 2 ways to upgrade your db migrator project to a new version. First is to upgrade your java stack version in your parent Java project. Second is to manually set the DB Migrator version in your pom which applies specifically to stand-alone db migrator projects but can also be used on Java projects. This document is an overview for upgrading a db migrator project form v3 to v4 using the second method. The DB Migrator version is independent of the stack version. To determine your DB Migrator version you can view the output of a migration or search your "effective pom" for stackDBMigratorVersion.

Get trained: Introduction to DB Migrator

Please also see the [DB Migrator Docs]

The biggest changes are the ability to run scripts out of order, which is a better fit for branching, and the optional ability to sequence scripts with timestamps. Other features include the ability to see migration status, generate blank scripts, more precise logging, the ability to run un-parsed sql blocks, and much more.

Upgrading a project is fairly easy, add this property to your pom…

    <stackDBMigratorVersion>PUT THE LATEST/TARGET VERSION NUMBER HERE</stackDBMigratorVersion>

See a member of the stack team to determine which version to use.

For existing projects upgrading from a pre 4.0 version, add this property to your *-db.properties files…

db.autoUpdateMigrationTables=true

…to allow the tool to create and use a new tracking table - schema_migrations instead of schema_info

You might also consider making a base-db.properties file and moving the properties that are common between ALL your property files into it.

If you want to create a blank project that is configured the "new" way, to mess around with, you can use our stack starter and produce a java project that has a db module in it. Go to LDS Java Stack and search for "Stack Starter"

Please contact a member of the stack team for assistance and to determine the level of risk to your project.

This page was last modified on 21 June 2012, at 09:35.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.