Is there a pre-GORM init hook in Grails?
<p>I'm trying to address a very specific requirement in our Grails 2.5.x application: I'd like to upgrade the database schema before the application starts by applying a series of database conversion scripts (depending on the DB version / app version). We did this in the past in a "traditional" Java Servlet app, but I'm struggling with Grails a bit.</p>

<p><strong>Question:</strong> is there an event, in Grails, that I could somehow hook into during the app startup that would allow me to use Groovy and existing DataSource configuration, yet would occur before the GORM/Hibernate starts up?</p>

<p>Some options I've already checked:</p>

<ul>
<li>BootStrap's init closure wouldn't work here, as the app simply wouldn't start with the "validate" mode if the database schema was out of date.</li>
<li>There's Events.groovy that I haven't used before, but it seems these events are aimed at grails compile/build lifecycle rather than the self-contained application packaged in a WAR file and deployed to an app container.</li>
<li>The grails <a href="https://grails.org/plugin/database-migration" rel="nofollow">database-migration</a> plugin seems to be similar and expects Grails command line to be available on the target server, <s>and the conversion to be performed manually by the administrator</s>. <em>It turns out I was most likely wrong here.</em></li>
</ul>