1

My grails-project contains also tables from a legacy database. These tables must not be touched in any way by the grails-app.

Even when running in the develop environment the tables must be untouched. How can that be done?

larand
  • 773
  • 1
  • 9
  • 26
  • try disabling the dbCreate line in DataSource.groovy – V H Mar 13 '17 at 11:57
  • Sorry, a stupid question. I was thinking that in the first tests in production-environment there is still a good chance that I need to rebuild the tables a few times and as I use a few legacy-tables, just for reading, I can't have the option that re-creates tables unless there where some way to exclude certain tables. But I think I could manage to manually update the new tables when necessary. – larand Mar 13 '17 at 20:47
  • why manually ? save yourself all the hassle look up `schema-export` - you can get grails from development to dump entire db structure into a DDL.sql file, If tables already exist. Look through file for segment you need. http://docs.grails.org/2.2.1/ref/Command%20Line/schema-export.html – V H Mar 13 '17 at 20:50
  • That was a good idea, I've never used it before but I'll test it. Thanks. – larand Mar 13 '17 at 20:54
  • I know grails rocks dude :) – V H Mar 13 '17 at 21:20

0 Answers0