Creating mysql triggers with migrations blows up

In the client you’re executing a single valid command. Here, you’re executing a series of invalid commands. Pass a valid SQL to execute, not SQL fragments.

jeremy

Execute just passes the SQL to the database; there is no further contemplation. Your workaround is the appropriate way to execute multiple statements.

By the way, delimiter is a mysql client command, so you’re out of luck trying to execute it on the server in any case.

jeremy