Open luna-duclos opened 8 years ago
It's been a long time since I touched this code, but I'm guessing this is caused by sqlparse (https://github.com/rubenv/sql-migrate/tree/master/sqlparse) not understanding function definitions.
In a migration we need to split each query and execute it separately. For now this is rather simplistic. To support functions, we'll either need to add a hack to make that work or get a full SQL-to-AST parser in there and do it properly.
I have the following migrate file, I can't seem to get CREATE FUNCTION to work with multi-statement functions at all, even when using
-- +migrate StatementBegin
and-- +migrate StatementEnd