I try add to some table new column, how its described in documentation for sqlalchemy-migrate< like:
col = Column('col1', String, default='foobar')
col.create(table, populate_default=True)
But I get error, i think its because i use declarative models, how i can us开发者_开发问答e migrations?
def upgrade(migrate_engine):
Base.metadata.bind = migrate_engine
col = Column('col1', String, default='foobar')
col.create(table, populate_default=True)`
worked for me.
精彩评论