Asterisk - The Open Source Telephony Project  18.5.0
Functions | Variables
0be05c3a8225_add_early_media_options Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = 'd3e4284f8707'
 
string revision = '0be05c3a8225'
 
string YESNO_NAME = 'yesno_values'
 
list YESNO_VALUES = ['yes', 'no']
 

Function Documentation

◆ downgrade()

def 0be05c3a8225_add_early_media_options.downgrade ( )

Definition at line 28 of file 0be05c3a8225_add_early_media_options.py.

28 def downgrade():
29  if op.get_context().bind.dialect.name == 'mssql':
30  op.drop_constraint('ck_ps_systems_follow_early_media_fork_yesno_values','ps_systems')
31  op.drop_constraint('ck_ps_systems_accept_multiple_sdp_answers_yesno_values','ps_systems')
32  op.drop_constraint('ck_ps_endpoints_follow_early_media_fork_yesno_values','ps_endpoints')
33  op.drop_constraint('ck_ps_endpoints_accept_multiple_sdp_answers_yesno_values','ps_endpoints')
34  op.drop_column('ps_systems', 'follow_early_media_fork')
35  op.drop_column('ps_systems', 'accept_multiple_sdp_answers')
36  op.drop_column('ps_endpoints', 'follow_early_media_fork')
37  op.drop_column('ps_endpoints', 'accept_multiple_sdp_answers')

◆ upgrade()

def 0be05c3a8225_add_early_media_options.upgrade ( )

Definition at line 20 of file 0be05c3a8225_add_early_media_options.py.

20 def upgrade():
21  yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
22 
23  op.add_column('ps_systems', sa.Column('follow_early_media_fork', yesno_values))
24  op.add_column('ps_systems', sa.Column('accept_multiple_sdp_answers', yesno_values))
25  op.add_column('ps_endpoints', sa.Column('follow_early_media_fork', yesno_values))
26  op.add_column('ps_endpoints', sa.Column('accept_multiple_sdp_answers', yesno_values))
27 

Variable Documentation

◆ down_revision

string down_revision = 'd3e4284f8707'

Definition at line 11 of file 0be05c3a8225_add_early_media_options.py.

◆ revision

string revision = '0be05c3a8225'

Definition at line 10 of file 0be05c3a8225_add_early_media_options.py.

◆ YESNO_NAME

string YESNO_NAME = 'yesno_values'

Definition at line 17 of file 0be05c3a8225_add_early_media_options.py.

◆ YESNO_VALUES

list YESNO_VALUES = ['yes', 'no']

Definition at line 18 of file 0be05c3a8225_add_early_media_options.py.