olirice / alembic_utils

An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
MIT License
193 stars 42 forks source link

More robust function parsing with pglast, procedure support #127

Closed dani-maarouf closed 2 months ago

dani-maarouf commented 2 months ago

Caveats:

olirice commented 2 months ago

thanks for opening

Unfortunately, I don't want to add support for procedures directly in alembic_utils. Functions have proven to be problematic in that they are hard to parse reliably, support multiple PLs etc etc. For that reason I'm hesitant to expand into procedures, which will face those same problems.

alembic_utils is extensible though, so you can certainly maintain this in your own fork, or subclass ReplaceableEntity directly in the project where you want to use it

dani-maarouf commented 2 months ago

Sure. Thanks for writing this utility, it's quite useful.

In my fork I've added a few features that I need, detailed here: https://github.com/dani-maarouf/alembic_utils?tab=readme-ov-file#alembic-utils

Let me know if you want me to open a PR to upstream any of the changes