olirice / alembic_utils

An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
https://olirice.github.io/alembic_utils
MIT License
211 stars 43 forks source link

PGTrigger -> cls to allow easier subclassing #75

Closed aidos closed 2 years ago

aidos commented 2 years ago

At the moment if you want to subclass PGTrigger you need to copy the from_database in order to switch from PGTrigger to your subclass. This allows you to skip that step.

olirice commented 2 years ago

could you please add this change to other subclasses of ReplaceableEntity e.g. PGView?

aidos commented 2 years ago

Argh, apologies, yes. Done.

olirice commented 2 years ago

the failing pre-commit hook is for black, the code formatter

this should get it passing

# in the repo root
pre-commit install
pre-commit run --all
# add and push changes to the branch
aidos commented 2 years ago

Done

aidos commented 2 years ago

Awesome! Thanks for your help getting it through so quickly.