Replies: 1 comment
-
Hi @Manfred73
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have migrated my spring service to Quarkus, but running into an issue with some integration tests.
One of my integration tests checks an error if a duplicate record is inserted into the database (unique constraint set on one of the fields in a db table).
In spring I used h2 and schema.sql to create the db schema. This schema.sql also created the (unique) indexes and the tables. And for the repository test I used @DataJpaTest(properties = "spring.jpa.generate-ddl=true") .
Now in Quarkus, the schema is created based on the entities (and no indexes are created), thus my integration test for checking duplicate fails.
Is there a way to tell quarkus it should use the schema.sql under src/main/resources to create the database instead of using the entities for that?
Is there also an alternative for spring.jpa.generate-ddl=true?
Beta Was this translation helpful? Give feedback.
All reactions