You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated issue, originally created by Wouter Bolsterlee (@wbolster)
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.
The text was updated successfully, but these errors were encountered:
it would be called postgresql_using. I can accept this as a PR which would alter the alembic/ddl/postgresql.py dialect to support this flag, in a similar way as something like "mssql_drop_foreign" in alembic/ddl/mssql.py.
Added support for the USING clause to the ALTER COLUMN operation
for Postgresql. Support is via the
:paramref:.op.alter_column.postgresql_using
parameter.
Migrated issue, originally created by Wouter Bolsterlee (@wbolster)
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 theSET DATA TYPE
clause of theALTER 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'sop. alter_column()
. It would be great if something likealter_column(using="convert_from(data, 'utf-8')::jsonb")
would work.The text was updated successfully, but these errors were encountered: