views:

51

answers:

2

Hi there,

I am deploying to a unix box running Jboss. We are using SQL Server 2008 as our database. Once deployed I push the changes by re-deploying the war to the environment.

I see server.log has errors, seems hibernate tries to re-generate/modify tables already created. I am using dbCreate = "update" setting in my datasource.groovy file.

Could anyone let me know the best practice for db settings so that I dont see these errors in the log file.

Thanks, Appreciated. WB

2010-09-09 15:32:35,012 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (main) Unsuccessful: alter table.....

+3  A: 

If you are managing the schema yourself, just comment out dbCreate entirely or use dbCreate = "validate".

You might want to check out the Liquibase plugin to do automated database migration similar to ActiveRecord::Migration in Rails

ataylor
A: 

you are getting that error because there is a change in your domain objects that grails/hibernate cannot successful execute, probably do to constraints of data.

changing the dbCreate value might remove the error in the log, but I suspect the application will fail elsewhere

Aaron Saunders