@Michael Bayer, thanks for your above recommendations. (Related and older Stackoverflow questions are here and here.)
I’m currently looking into a very similar problem: adding values to an existing Enum column, and migrating data along. Currently, our DB is MySQL but I’m planning to switch to PostgreSQL within the next few months.
Question: your suggestion to op.alter_column() will not modify any row data, correct? So if the change removes existing Enum values, what happens, particularly if the column can’t have NULL values. I assume that in such truncating cases I’d have to manually iterate over the existing Enum values and map them to the new set?
There is a mechanism to map values to different enums without iterating, using a SQL "CASE WHEN" statement to remap. This is done commonly when converting a TEXT or INTEGER value to an enumerated value