51f8cb66540e_add_further_dtls_options.py

Go to the documentation of this file.
00001 """add further dtls options
00002 
00003 Revision ID: 51f8cb66540e
00004 Revises: c6d929b23a8
00005 Create Date: 2014-06-30 07:16:12.291684
00006 
00007 """
00008 
00009 # revision identifiers, used by Alembic.
00010 revision = '51f8cb66540e'
00011 down_revision = 'c6d929b23a8'
00012 
00013 from alembic import op
00014 import sqlalchemy as sa
00015 from sqlalchemy.dialects.postgresql import ENUM
00016 
00017 YESNO_NAME = 'yesno_values'
00018 YESNO_VALUES = ['yes', 'no']
00019 
00020 def upgrade():
00021     ############################# Enums ##############################
00022 
00023     # yesno_values have already been created, so use postgres enum object
00024     # type to get around "already created" issue - works okay with mysql
00025     yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
00026 
00027     op.add_column('ps_endpoints', sa.Column('force_avp', yesno_values))
00028     op.add_column('ps_endpoints', sa.Column('media_use_received_transport', yesno_values))
00029 
00030 def downgrade():
00031     op.drop_column('ps_endpoints', 'force_avp')
00032     op.drop_column('ps_endpoints', 'media_use_received_transport')

Generated on Thu Apr 16 06:27:05 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6