I'm probably not making the issue clear. Two problems exists that I see, and are specific with _not_ using the GORM method for creating tables from the domain objects. (Note that I've tried several combinations for databaseSchemaUpdate(Config.groovy) and dbCreate(DataSource.groovy) and are listed below.) The goal is to not create the activiti schema before running grails. Rather I want the schema created either by liquibase during the execution of the grails plugin database-migration, or from activiti plugin itself. If I have to do anything before this step, then I cannot use the liquibase plugin and instead would use liquibase via ant script or command line. I'd rather my devs not have to execute two commands to 'setup' the database.
1) If I want to have the liquibase grails plugin 'database-migration' to create the activiti tables, then I would set databaseSchemaUpdate=false. This does not work. Reason is because when I try to run the grails script 'dbm-update' that the liquibase plugin provides, activiti errors out when the plugin is being initialized because activiti plugin will try to load up the domain model data before the liquibase plugin executes its code to create the tables. (Note that here I have the dbCreate _not_ set. its commented out due to my desire to have liquibase handle the table creation/updates) In this case, I do not see a way for the activiti plugin to help with the issue as its a grails issue itself. (Loading/execution order)
2) If instead I want the activiti plugin to handle the activiti database table creation, _and_ the liquibase plugin to handle the other database tables, then I set databaseSchemaUpdate=true. This fails for the reason I mentioned above: invalid sql being executed. (To re-iterate, a transaction is started, then the select is called to get the current version of the activiti schema which fails, which prevents all table creation. The log I gave shows this. The fix is to not start the transaction until after the select is called.) Here, activiti can be fixed to solve this issue. (Note, again, dbCreate is not set in this case.)
What was _not_ a problem was if I had grails GORM manage the tables. (Meaning, dbCreate="update" or something else) This doesn't work for me due to the fact that the GORM migrations do not do enough for database maintenance for us.
If we cannot solve item 2 above, my workaround is to use liquibase without the grails plugin... not optimal but gets my team moving. However, I think the solution I mention is easy enough though I'm not sure if its in the activiti plugin or activiti itself.