I need to insert some default data into my database. I am using Spring Boot with Flyway integration. For testing, I use H2. MySQL will be used for production.
I made separate Flyway migration scripts, so I can use the database material for the default data (creating tables is done in a common script).
For MySQL, I have something like this:
INSERT INTO survey_definition (id, name, period)
VALUES (0x2D1EBC5B7D2741979CF0E84451C5BBB1, 'disease-activity', 'P1M');
How can I do the same for H2?
I only found a function RANDOM_UUID()that works, but I need to use the famous UUID because I use it as foreign keys in further statements.
source
share