I need to add a couple functions and views that are part of the system schema design. This should be part of the session start up (especially in development and test) because of the dbCreate create-drop settings on the data source so that the initial dev & test environments are initially set up consistently & pristine.
It does not make sense to use the database migration plugin because these are predefined db objects that are part of the whole system design and do not belong in a change set unless they themselves are changing. It's equivalent to requiring us to add the domain table generation sql in a change set. It makes sense if it's changing (that's what a change set is for!), but if it's just being initially created, it's conceptually the wrong place to put it.
Further we can't use the migration plugin because our production QA process does not allow for that approach (it is an external process not tied to the project source so it doesn't make sense to have the change sets maintained in multiple projects).
Hibernate generates it's schema automatically from the grails domain objects, we have the sql for the views (dependent on the tables from the domain objects) as well as the sql for a few functions used within those views, and we just need to determine where to best have GORM / Hibernate execute said sql in order to generate the appropriate db objects when the schema is generated.
In Grails 2.5.5 I used a custom GrailsAnnotationConfiguration to hook in to the schema generation process. This is no longer an option with the use of Hibernate 5 in grails 4+.
What is the best way to tie in to the Hibernate Schema generation process in order to add custom db objects like functions and views without relying on the database migration plugin?