Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
op.create_table emit_events arg is an invalid argument #81
Migrated issue, originally created by Robert Kopaczewski (@23doors)
According to docs, emit_events=True should imply that before_create and after_create events will be emitted.
That's not the case.
Is there some other way to create custom indexes with alembic?
Michael Bayer (@zzzeek) wrote:
that documentation note is apparently an inadvertent checkin, is removed in 894afbf.
The feature it discusses is more related to PG's ENUM type, which can now be created directly now. Alembic fires off the before_create() and after_create() events for CreateTable in all cases. However, using these kinds of events directly in an Alembic script just makes the script more complicated, as an alembic script is just a straight list of DDL to emit, you just add any additional DDL inline.
The term "custom indexes" can mean several things. If it means, you just want to create an index explicitly, you just use op.create_index(). If it means, you want to create an index that makes use of some unsupported syntax, like a Postgresql functional index, you write out the "CREATE INDEX" statement as a string and invoke it via op.execute().