Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
23530d604b96_add_rpid_immediate Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = '45e3f47c6c44'
 
string revision = '23530d604b96'
 
string YESNO_NAME = 'yesno_values'
 
list YESNO_VALUES = ['yes', 'no']
 

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 47 of file 23530d604b96_add_rpid_immediate.py.

47def downgrade():
48 if op.get_context().bind.dialect.name == 'mssql':
49 op.drop_constraint('ck_ps_endpoints_rpid_immediate_yesno_values','ps_endpoints')
50 op.drop_column('ps_endpoints', 'rpid_immediate')

◆ upgrade()

def upgrade ( )

Definition at line 38 of file 23530d604b96_add_rpid_immediate.py.

38def upgrade():
39 ############################# Enums ##############################
40
41 # yesno_values have already been created, so use postgres enum object
42 # type to get around "already created" issue - works okay with mysql
43 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
44
45 op.add_column('ps_endpoints', sa.Column('rpid_immediate', yesno_values))
46

Variable Documentation

◆ down_revision

string down_revision = '45e3f47c6c44'

Definition at line 29 of file 23530d604b96_add_rpid_immediate.py.

◆ revision

string revision = '23530d604b96'

Definition at line 28 of file 23530d604b96_add_rpid_immediate.py.

◆ YESNO_NAME

string YESNO_NAME = 'yesno_values'

Definition at line 35 of file 23530d604b96_add_rpid_immediate.py.

◆ YESNO_VALUES

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

Definition at line 36 of file 23530d604b96_add_rpid_immediate.py.