Search code examples
grailsgrails-plugingrails-domain-classliquibase

Grails db-migration table already exists


I'm using Grails 1.3.7 and the db-migration plug-in.

I have generated a chagelog.groovy-file containing my delta, I set theese properties:

grails.plugin.databasemigration.updateOnStart = true
grails.plugin.databasemigration.updateOnStartFileNames = ['changelog.groovy‘]

Now in my Datasource.groovy I have the the dbCreate to update.

I start my application and it tells me that the table I have in my delta is already created.

Any ideas on this?


Solution

  • You don't need to set any dbCreate option in your DataSource.groovy.

    The migration plugin manages all necessary operations if you specified your delta correctly.

    Example part of your DataSource.groovy:

    production {
       dataSource {
          dbCreate = ""
          url = "yourDBUrl"
          username = "yourUser"
          password = "yourPassword"
       }
    }