Altering an Enum field using Alembic
I decided to try to follow the postgres approach as directly as possible and came up with the following migration. from alembic import op import sqlalchemy as sa old_options = (‘nonexistent_executable’, ‘signal’, ‘success’, ‘timed_out’) new_options = sorted(old_options + (‘output_limit_exceeded’,)) old_type = sa.Enum(*old_options, name=”status”) new_type = sa.Enum(*new_options, name=”status”) tmp_type = sa.Enum(*new_options, name=”_status”) tcr = sa.sql.table(‘testcaseresult’, sa.Column(‘status’, … Read more