from sqlalchemy import from migrate import from migrate changeset impo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from sqlalchemy import *
from migrate import *
from migrate.changeset import schema
from svarga.core.env import env
from avatar.models import Avatar
meta = Meta(env.sqla.engine)
avatar = Table(Avatar.__tablename__, meta, autoload=True)
test = Column('test', Integer())
def upgrade():
avatar.create_column(test)
def downgrade():
avatar.drop_column(test)