Getting Flask-Migrate to Ignore SQL Views that are mapped as Flask-SQLAlchemy Models
I am using Flask-SQLAlchemy to define my models, and then using Flask-Migrate to auto-generate migration scripts for deployment onto a PostgreSQL database. I have defined a number of SQL Views on the database that I use in my application like below. However, Flask-Migrate now generates a migration file for the view as it thinks it's a table. How do I correctly get Flask-Migrate / Alembic to ignore the view during autogenerate? SQL View name: vw_SampleView with two columns: id and rowcount . class ViewSampleView(db.Model): __tablename__ = 'vw_report_high_level_count' info = dict(is_view=True)