I have a Quarkus app that I deploy in OpenShift. application.properties includes the following config:
quarkus.datasource.db-kind=h2
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.datasource.jdbc.url=jdbc:h2:mem:default
quarkus.smallrye-graphql.ui.always-include=true
This configuration results in schema being effectively created. However the database is not populated. All tables are empty. It seems import.sql is ignored.
To avoid this, I tried following:
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;INIT=RUNSCRIPT FROM 'classpath:import.sql'
This results in the import.sql indeed being executed. However this execution is happening before the schema is generated, causing a tome of errors that say that tables do not exist.
How do I resolve this? Outside of OpenShift the first configuration above works as expected.