I imagine that it nowadays is quite common to use one RDBMS during development and another RDBMS in production. I'd like to use H2 in development and MariaDB in production for a Spring Boot and JOOQ based application.
Is there some clever way to make the same generated JOOQ code work in both development and production environments, or do I need to generate two sets of code depending on the target environment? If the latter is true, how to do that in a sane way e.g. using the nu.studer.jooq gradle plugin?
Exceptions like this are thrown whenever I try to use the sources generated from a H2 database against a MariaDB server:
org.mariadb.jdbc.internal.util.dao.QueryException: SELECT command denied to user 'foo'@'localhost' for table 'FOO'
Query is: select `PUBLIC`.`FOO`.`ID`, `PUBLIC`.`FOO`.`NAME`, `PUBLIC`.`FOO`.`INFO` from `PUBLIC`.`FOO`
I use the same flyway initialization/migration scripts for both H2 and MariaDB.