45 context = op.get_context()
48 if context.bind.dialect.name !=
'postgresql':
49 op.alter_column(
'sippeers',
'directmedia',
51 existing_type=old_type)
53 enum = ENUM(
"yes",
"no",
"nonat",
"update",
"outgoing",
54 name=
"sip_directmedia_values_v2")
55 enum.create(op.get_bind(), checkfirst=
False)
57 op.execute(
'ALTER TABLE sippeers ALTER COLUMN directmedia TYPE'
58 ' sip_directmedia_values_v2 USING'
59 ' directmedia::text::sip_directmedia_values_v2')
61 ENUM(name=
"sip_directmedia_values").drop(op.get_bind(), checkfirst=
False)