You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why isn't the audit_table() trigger added to new tables that are created with alembic revision --autogenerate? Am I correct in suspecting that Alembic doesn't support this?
If so, perhaps we could add a section in the documentation about using alembic's rewriter functionality to achieve this instead. This is how I'm currently solving it in my env.py:
It should be noted that the __versioned__ attribute isn't respected when doing it this way. AFAIK the model isn't available in this context, but perhaps __versioned__ could be passed to the table. Maybe you have some idea on how to achieve this, @kvesteri?
The text was updated successfully, but these errors were encountered:
This sounds really good! I'm fine with passing __versioned__ to the table or passing it to the info attribute of the Table object. I haven't worked with alembic rewriters so my guess is as good as yours.
Why isn't the
audit_table()
trigger added to new tables that are created withalembic revision --autogenerate
? Am I correct in suspecting that Alembic doesn't support this?If so, perhaps we could add a section in the documentation about using alembic's rewriter functionality to achieve this instead. This is how I'm currently solving it in my
env.py
:It should be noted that the
__versioned__
attribute isn't respected when doing it this way. AFAIK the model isn't available in this context, but perhaps__versioned__
could be passed to the table. Maybe you have some idea on how to achieve this, @kvesteri?The text was updated successfully, but these errors were encountered: