Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
I do not know if there is a simple way around it, but I am running into a bug when using MySQL and Flyway. Version doesn't really matter, but I tried it with MySQL5-8 as well as Flyway 6.2.1.
CREATE TRIGGER before_insert_users BEFORE INSERT ON USERS FOR EACH ROW IF new.api_key IS NULL THEN SET new.api_key = uuid(); END IF;
The issue is that Flyway parses in the statement but thinks the ";" after uuid() is the end of the statement, hence cutting of the END IF and hence you cannot apply that migration succesfully.
Is there an easy way to change delimiters in these cases or is this a bug?
The text was updated successfully, but these errors were encountered:
Looks like this is a bug. There's no way to change the delimiters, it's something we need to fix on our end.
Sorry, something went wrong.
After more investigation we've actually found a workaround using the MySql DELIMITER option. The parser seems to be happy with things like:
CREATE TRIGGER before_insert_users BEFORE INSERT ON USERS FOR EACH ROW IF new.api_key IS NULL THEN SET new.api_key = uuid(); END IF#
Nonetheless we should still fix it.
No branches or pull requests