Any way to use "using" in modify?

Hi guys. Is there a way to translate such sql into alter table/ modify column ?

ALTER TABLE tableName
   ALTER COLUMN varcharColumn TYPE enum_type
    USING varcharColumn::enum_type
1 Like

Can’t remember details now but I did it before successfully. Something like this should work:

alter table(:tableName) do
  modify(:varcharColumn, :enum_type)
end

Have you tried that?

I definitely tried that, but this one does not generate USING. And without USING postgres generates error.

I see. I can’t now remember how I did it but in my current work we just use raw SQL. Sorry I can’t be of more help but the raw SQL is just fine as well.