3

I have a column address_id = db.Column(db.Integer, db.ForeignKey(Address.id, ondelete='CASCADE'), index=True). Autogenerating a migration with Alembic always adds a drop_index operation.

op.drop_index('address_id', 'companies')

Why does this happen every time I generate a migration?

davidism
  • 121,510
  • 29
  • 395
  • 339
Viorel
  • 1,420
  • 1
  • 17
  • 27

1 Answers1

4

This is a known bug in Alembic 0.6.1. Upgrade to 0.6.2 or newer and the problem will go away.

davidism
  • 121,510
  • 29
  • 395
  • 339
Miguel Grinberg
  • 65,299
  • 14
  • 133
  • 152