Closed jacobeatsspam closed 2 weeks ago
Ah yes, so basically the tact i've taken for other object has been to update to_sql
(and thus to_sql_[create/update/drop]
) to return list[str]
instead of just str
; and then deal with the fallout of that in procedure/ddl.py
and alembic/procedure.py
.
I've been meaning to do this to all the objects, mainly because this isn't the first time this has happened, but alas!
Were you planning on working on this? or should I?
We prototyped out some code so we could get the ball rolling within our codebase, but it's not complete. It's missing things like support for specifying parameters and the DDL issue I asked about. You'd probably be faster than us since you're on a roll.
Thanks for the base impl! figuring out the queries (esp for a database i dont use personally) is always the biggest pain.
Hello, it's me again :smile:
Opening this issue to discuss what it would take to add support for procedures.
Most everything seems to be straight forward, but I have one current question - how to handle replacement during creation.
The MySQL documentation suggests that
OR REPLACE
is not available, but unlike Triggers, the DDL is not written to supportto_sql_update
returning a list of operations, so I can't wrap a combined drop/create step.Let me know what you think about this. I'm hoping the answer is to simply refactor the current DDL and compare approach, but maybe you have a better answer.