I have a flask-sqlalchemy model:
class MyModel(db.Model): __tablename__ = \'targets\' id = db.Column(db.Integer, primary_key=True) url = db.Column(db.String(2048
Since the question was asked, support has been added for this.
Now you can just add index=True to an existing column, and auto-generate the migration.
index=True
Checked on the following package versions:
alembic==1.0.10 SQLAlchemy==1.3.4 SQLAlchemy-Utils==0.34.0 Flask-SQLAlchemy==2.4.0 Flask-Migrate==2.5.2