1. Michael Bayer
  2. alembic
  3. Issues


Issue #39 duplicate

add postgresql_using option to alter_column

Michael Bayer
repo owner created an issue

to change the type of a col between two non-convertible types, PG wants an option "USING" for this:


that is:

ALTER TABLE images ALTER COLUMN id TYPE INTEGER using id::integer

This is not something I feel like having Alembic guess on and/or look up in a big hard-to-maintain translation table, so for now we can just have it be explicit as needed with postgresql_using.

Comments (8)

  1. Log in to comment