from sqlalchemy import * from migrate import * def upgrade(migrate_engine): try: meta = MetaData(bind=migrate_engine) server = Table('server', meta, autoload=True) subnet = Column('subnet', Integer, nullable=False) subnet.create(server) except: pass def downgrade(migrate_engine): try: meta = MetaData(bind=migrate_engine) server = Table('server', meta, autoload=True) server.c.subnet.drop() except: pass