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
I just came across this problem working with the JSONB
column type - the binary version of the JSON
type, which doesn't map to TEXT
.
For future reference, you can define a custom type in H2 using CREATE DOMAIN
, as follows:
CREATE domain IF NOT EXISTS jsonb AS other;
This seemed to work for me, and allowed me to successfully test my code against the entity.
Source: https://objectpartners.com/2015/05/26/grails-postgresql-9-4-and-jsonb/