Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
7f85dd44c775_fix_suppress_q850_reason_headers Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = 'fe6592859b85'
 
string revision = '7f85dd44c775'
 
string YESNO_NAME = 'yesno_values'
 
list YESNO_VALUES = ['yes', 'no']
 

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 34 of file 7f85dd44c775_fix_suppress_q850_reason_headers.py.

34def downgrade():
35 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
36 if op.get_context().bind.dialect.name != 'mssql':
37 op.alter_column('ps_endpoints', 'suppress_q850_reason_headers', type_=yesno_values,
38 new_column_name='suppress_q850_reason_header')
39 else:
40 op.alter_column('ps_endpoints', 'suppress_q850_reason_headers', existing_type=yesno_values, type_=sa.String(3),
41 new_column_name='suppress_q850_reason_header')
42 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=True)
43 op.alter_column('ps_endpoints', 'suppress_q850_reason_header', existing_type=sa.String(3), type_=yesno_values)

◆ upgrade()

def upgrade ( )

Definition at line 21 of file 7f85dd44c775_fix_suppress_q850_reason_headers.py.

21def upgrade():
22 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
23
24 if op.get_context().bind.dialect.name != 'mssql':
25 op.alter_column('ps_endpoints', 'suppress_q850_reason_header', type_=yesno_values,
26 new_column_name='suppress_q850_reason_headers')
27 else:
28 op.alter_column('ps_endpoints', 'suppress_q850_reason_header', existing_type=yesno_values, type_=sa.String(3),
29 new_column_name='suppress_q850_reason_headers')
30 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=True)
31 op.alter_column('ps_endpoints', 'suppress_q850_reason_headers', existing_type=sa.String(3), type_=yesno_values)
32
33

Variable Documentation

◆ down_revision

string down_revision = 'fe6592859b85'

◆ revision

string revision = '7f85dd44c775'

◆ YESNO_NAME

string YESNO_NAME = 'yesno_values'

◆ YESNO_VALUES

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