What's new? | Help | Directory | Sign in
Google
dbmigrate
DB migration for Java applications
  
  
  
  
    
Search
for
Updated Oct 02, 2007 by spullara
Labels: Featured
Grails  
Using the dbmigrate plugin with Grails

Introduction

The intent of this plugin is to be somewhat similar to 'rake migrate' but a little more sophisticated.

Scripts

There are two scripts included with this plugin. The first create-migration will automatically interrogate your database and create the next migration in sequence for you to fill in with database changes. These migrations will be named migratefromN.sql where N is the version of the database you are migrating from. They are placed in the grails-app/migrations/[database product name] directory within your application. If you don't have a db_version table in your database you must create that table as the first order of business:

CREATE TABLE db_version (version integer NOT NULL)

Finally, when you want to ensure that your database is at the latest version, simple execute the other script, grails migrate.


Comment by vrbala, Oct 11, 2007

CREATE TABLE db_version (version integer NOT NULL)

Comment by mchenryc, Nov 19, 2007

It appears the grails-plugin has moved to codehaus. A newer version is available at http://svn.codehaus.org/grails-plugins/grails-dbmigrate/trunk/ (as of 2007-11-20).


Sign in to add a comment