Spring Boot will execute data.sql
before Hibernate is able to generate the schema. During production, it's expected to have the schema already, but during dev, this might not be the case, so better to use Hibernate's import.sql
file, since that is only executed after Hibernate is able to generate the schema.
Use data.sql
only if you'll be generating the schema from a schema.sql
or via Liquibase and not via Hibernate.
No comments:
Post a Comment