I have a flyway migration file which has among others the following command:
grant all privileges on schema public to ${admin_user} with grant option;`
Now I also want to unit test the sql files using an H2 database. But even with turned on MODE=PostgreSQL
the grant statement is problematic as it is not understood by the H2 database. So what is the best practice here to tackle this kind of dialect problems?
From the FAQ, What is the best strategy for handling database-specific sql?: https://flywaydb.org/documentation/faq#db-specific-sql