I want to use this Spring properties file for database configuration.
spring.jmx.enabled=false
spring.datasource.jndi-name=java:/global/production
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
request.limit=300000
spring.flyway.baselineOnMigrate = true
spring.flyway.locations=classpath:/db/migration
The code works well but unfortunately when database is empty after all tables are deleted I get SQL errors because migration script is executed first.
How I can configure JPA first to create tables and then flyway to execute migration script?