alembic_utils
alembic_utils copied to clipboard
An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
I'm trying to create an aggregate function to concat arrays even if they're empty, as described [here](https://stackoverflow.com/questions/43472482/postgres-array-agg-throws-cannot-accumulate-empty-arrays-for-empty-arrays) Running this directly on Postgres works ```sql CREATE AGGREGATE array_accum (anyarray) ( sfunc...
Do we have a PGFunction equivalent for procedure statement? Right now we could do `PGFunction.from_sql('create function...')` or `PGFunction(..constructor params)` Is there a `PGProcedure` class that we can use to generate...
I am trying to grasp how to deal with modularized code that defines entities in different places. As far as I understand from the code one is supposed to call...
Little experient to see if the schema parameter could be made optional. As the schema is the first argument it can;t be changed to optional without breaking backards compatibitily or...
https://github.com/olirice/alembic_utils/blob/2e9cce207b3a3ef29871c7ddeffd8d2dc1796f0d/src/alembic_utils/pg_function.py#L92 This breaks when when a parameter name includes the word "default" e.g. ```python jsonb_array_elements(arr jsonb, default_arr jsonb = '[]') ``` ```python from parse import parse template = "{function_name}({parameters})" result...
Execute required ops from alembic when resolving required ops for alembic_utils ReplaceableEntities
Hey, PR for adding MSSQL View support - it's not polished yet but fully functional and working. I've obviously hit a few bumps in the road because it seems it...
I have a bunch of functions, extensions and policies registered and it's impossible to run autogenerate anymore. It looks like there is something going exponential in the compare_registered_entities. the console...
I'm having issues autogenerating a migration. I have a Materialized view (`mat_view`) that is dependent on another view (`view1`) which is dependent on a view (`view2`) that changed. `view2`'s changes...