def upgrade():
#op.execute("original sql")
op.alter_column('table', '字段',
existing_type=sa.VARCHAR(length=128),
type_=sa.Integer(),
existing_nullable=True,
postgresql_using='字段::Integer' )
需要手动添加postgresql_using
相当于ALTER TABLE schedule ALTER COLUMN 字段 TYPE INTEGER USING 字段::integer;