Migrated issue, originally created by Wouter Bolsterlee ()
When changing a column's type, it is sometimes necessary to specify how to convert the existing value into a value of the new type. This is done using the USING clause of the SET DATA TYPE clause of the ALTER TABLE statement. See http://www.postgresql.org/docs/9.4/static/sql-altertable.html for details.
Currently it seems impossible to specify the USING clause using Alembic's op. alter_column(). It would be great if something like alter_column(using="convert_from(data, 'utf-8')::jsonb") would work.
该提问来源于开源项目:sqlalchemy/alembic