Is there a way to ignore column comments during revision --autogenerate
#892
-
We are currently using alembic for schema change management, and also another tool to apply comments on columns for data documentation purpose. However when we run |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
several, the most direct is to apply column_reflect to the Table class in env.py and set "comment" to blank: from sqlalchemy import event
from sqlalchemy import Table
@event.listens_for(Table, 'column_reflect')
def receive_column_reflect(inspector, table, column_info):
column_info['comment'] = None the compare logic should skip entirely if the "comment" is reflected as None so the above should disable all comparison. |
Beta Was this translation helpful? Give feedback.
several, the most direct is to apply column_reflect to the Table class in env.py and set "comment" to blank:
the compare logic should skip entirely if the "comment" is reflected as None so the above should disable all comparison.