I use in application MySQL 5.7 and I have JSON columns. When I try running my integration tests don\'t work because the H2 database can\'t create the table. This is the erro
A workaround is actually to create a custom column data type in H2 for the jsonb type, and put the query in the datasource url like this:
spring.datasource.url=jdbc:h2:mem:testdb;INIT=create domain if not exists jsonb as text;MODE=PostgreSQL"
Now for tests and integration tests in particular, it would be preferable to use the same DB than your application, via TestContainers