Spring Boot. @DataJpaTest H2 embedded database create schema
I have couple of entities in my data layer stored in particular schema. For example: @Entity @Table(name = "FOO", schema = "DUMMY") public class Foo {} I'm trying to setup H2 embedded database for integration testing of my data layer. I'm using @DataJpaTest annotation for my tests to get H2 embedded database configured automatically. However, the creation of tables fails because schema DUMMY is not created at DB initialization. Any ideas on how to create schema before creation of tables in test cases? I've tried to use @Sql(statements="CREATE SCHEMA IF NOT EXISTS DUMMY") but didn't succeed.