Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Can't create stored procedures in migration script. #4

brazzy opened this Issue · 2 comments

2 participants

Michael Borgwardt John Hobbs
Michael Borgwardt

Migrations simply splits the script at semicolons to get queries. This fails with stored procedures, which exactly for that reason use the DELIMITER command to temporarily redefine the delimiter.

Here's a Stackoverflow answer where somone solved that problem, maybe you could ask them if you can use the code:

John Hobbs

Thanks for opening an issue. I'm not a stored procedures guy, so I overlooked that. I'll see what I can do.

I've been working on another migration tool, K3-Migrate, which is more of a DSL for migrations rather than raw SQL. No stored procedures support there, but I'd appreciate some input on an API you think would be reasonable.


Michael Borgwardt

Well this may be colored by my experience working with raw SQL, which has me feeling pretty comfortable with it - but I don't see the point in that. SQL is a DSL for database queries, so what problem can you solve by building a complex PHP API around it, that still won't cover everything? Stored procedures are probably the most obvious case: there is no sane way to do them that doesn't involve simply passing a string with the SQL script to the DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.