25 context = op.get_context()
28 if context.bind.dialect.name !=
'postgresql':
29 op.alter_column(
'ps_endpoints',
'100rel',
31 existing_type=old_type)
33 enum = ENUM(*NEW_ENUM, name=
'pjsip_100rel_values_v2')
34 enum.create(op.get_bind(), checkfirst=
False)
36 op.execute(
'ALTER TABLE ps_endpoints ALTER COLUMN "100rel" TYPE'
37 ' pjsip_100rel_values_v2 USING'
38 ' "100rel"::text::pjsip_100rel_values_v2')
40 ENUM(name=
"pjsip_100rel_values").drop(op.get_bind(), checkfirst=
False)
43 context = op.get_context()
45 if context.bind.dialect.name !=
'postgresql':
46 op.alter_column(
'ps_endpoints',
'100rel',
48 existing_type=new_type)
50 enum = ENUM(*OLD_ENUM, name=
'pjsip_100rel_values')
51 enum.create(op.get_bind(), checkfirst=
False)
53 op.execute(
'ALTER TABLE ps_endpoints ALTER COLUMN "100rel" TYPE'
54 ' pjsip_100rel_values USING'
55 ' "100rel"::text::pjsip_100rel_values')
57 ENUM(name=
"pjsip_100rel_values_v2").drop(op.get_bind(), checkfirst=
False)