I am using MySQL as my database and H2 for testing. I am also using playframework 2.3.x and Scala, but I think does not matter for the question purpose.
H2 has a conflict with some functions that I am using in a query
SELECT *
FROM subscriptions
WHERE active_until >= (DATE_SUB(CURDATE(), INTERVAL 3 DAY))
AND active_until <= (DATE_ADD(CURDATE(), INTERVAL 1 DAY))
AND status = "ACTIVE"
The functions that cause the problem are DATE_SUB and DATE_ADD.
Is there a workaround where I can make this work or change the query without breaking it for mysql?