This example shows how to use it with “non-declarative” – http://docs.sqlalchemy.org/en/latest/core/ddl.html#sqlalchemy.schema.DDL
How can I use it with the ORM declarative syntax?
For example, with this structure:
Base = declarative_base(bind=engine)
class TableXYZ(Base):
__tablename__ = 'tablexyz'
Silly example, but think this is what you’re looking for, should get you going:
Running the above results in – note “name text” for the added column:
I have my code in declarative and use the event.listen to add triggers and other stored procedures. Seems to work well.