I think it would be simplest to use a regular expression to pull out the symbol names from the declared function in order to write out the DROP text.
Otherwise, just add additional arguments to ReplaceableObject. It's a recipe so you should change it directly, I wouldn't create new superclasses or anything like that. On Fri, Oct 11, 2019, at 2:58 AM, Scott wrote: > I am using alembic with Snowflake. > > In terms of DDL migrations I need to cater for SECURED VIEWS, it is pretty > trivial to extend ReplaceableObject to deal with this. > > The other thing I am finding is that Snowflake insists that DROP FUNCTION be > provided with a list of the argument types along with the function name, so > with a function: > > CREATE FUNCTION myfunc(TABLENAME VARCHAR) > RETURNS VARCHAR > .... > > this does not work: > > DROP FUNCTION myfunc > > I need to go > > DROP FUNCTION myfunc(VARCHAR) > > But I cannot go > > DROP FUNCTION myfunc(TABLENAME VARCHAR) > > So in terms of using ReplaceableObject, to CREATE I need: > > ReplaceableObject( > "myfunc(TABLENAME VARCHAR)", > """ > RETURNS VARCHAR > LANGUAGE javascript > ... > > But to DROP I need: > > ReplaceableObject( > "myfunc(VARCHAR)", > """ > RETURNS VARCHAR > LANGUAGE javascript > ... > > I can hack something together with a superclass, but though I would mention > here in case someone has a cleaner solution. > > Cheers, Scott > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy-alembic" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy-alembic+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy-alembic/38d5e79a-2e50-4924-a77a-c2def597a132%40googlegroups.com > > <https://groups.google.com/d/msgid/sqlalchemy-alembic/38d5e79a-2e50-4924-a77a-c2def597a132%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy-alembic/95987d77-6110-49ae-b5d0-f7c4a199c1dc%40www.fastmail.com.