Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
37a5332640e2_update_pjsip_tls_method_list Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = 'dac2b4c328b8'
 
string PJSIP_TRANSPORT_METHOD_NEW_NAME = 'pjsip_transport_method_values_v2'
 
 PJSIP_TRANSPORT_METHOD_NEW_TYPE
 
list PJSIP_TRANSPORT_METHOD_NEW_VALUES
 
string PJSIP_TRANSPORT_METHOD_OLD_NAME = 'pjsip_transport_method_values'
 
 PJSIP_TRANSPORT_METHOD_OLD_TYPE
 
list PJSIP_TRANSPORT_METHOD_OLD_VALUES
 
string revision = '37a5332640e2'
 

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 43 of file 37a5332640e2_update_pjsip_tls_method_list.py.

43def downgrade():
44 # First we need to ensure that columns are not using the enum values
45 # that are going away.
46 op.execute("UPDATE ps_transports SET method = 'tlsv1' WHERE method IN ('tlsv1_1', 'tlsv1_2', 'tlsv1_3')")
47
48 if op.get_context().bind.dialect.name == 'postgresql':
49 enum = PJSIP_TRANSPORT_METHOD_OLD_TYPE
50 enum.create(op.get_bind(), checkfirst=False)
51
52 op.alter_column('ps_transports', 'method',
53 type_=PJSIP_TRANSPORT_METHOD_OLD_TYPE,
54 existing_type=PJSIP_TRANSPORT_METHOD_NEW_TYPE,
55 postgresql_using='method::text::' + PJSIP_TRANSPORT_METHOD_OLD_NAME)
56
57 if op.get_context().bind.dialect.name == 'postgresql':
58 ENUM(name=PJSIP_TRANSPORT_METHOD_NEW_NAME).drop(op.get_bind(), checkfirst=False)

◆ upgrade()

def upgrade ( )

Definition at line 30 of file 37a5332640e2_update_pjsip_tls_method_list.py.

30def upgrade():
31 if op.get_context().bind.dialect.name == 'postgresql':
32 enum = PJSIP_TRANSPORT_METHOD_NEW_TYPE
33 enum.create(op.get_bind(), checkfirst=False)
34
35 op.alter_column('ps_transports', 'method',
36 type_=PJSIP_TRANSPORT_METHOD_NEW_TYPE,
37 existing_type=PJSIP_TRANSPORT_METHOD_OLD_TYPE,
38 postgresql_using='method::text::' + PJSIP_TRANSPORT_METHOD_NEW_NAME)
39
40 if op.get_context().bind.dialect.name == 'postgresql':
41 ENUM(name=PJSIP_TRANSPORT_METHOD_OLD_NAME).drop(op.get_bind(), checkfirst=False)
42

Variable Documentation

◆ down_revision

string down_revision = 'dac2b4c328b8'

Definition at line 11 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_NEW_NAME

string PJSIP_TRANSPORT_METHOD_NEW_NAME = 'pjsip_transport_method_values_v2'

Definition at line 18 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_NEW_TYPE

PJSIP_TRANSPORT_METHOD_NEW_TYPE
Initial value:
1= sa.Enum(*PJSIP_TRANSPORT_METHOD_NEW_VALUES,
2 name=PJSIP_TRANSPORT_METHOD_NEW_NAME)

Definition at line 28 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_NEW_VALUES

list PJSIP_TRANSPORT_METHOD_NEW_VALUES
Initial value:
1= ['default', 'unspecified',
2 'tlsv1', 'tlsv1_1', 'tlsv1_2', 'tlsv1_3',
3 'sslv2', 'sslv23', 'sslv3']

Definition at line 22 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_OLD_NAME

string PJSIP_TRANSPORT_METHOD_OLD_NAME = 'pjsip_transport_method_values'

Definition at line 17 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_OLD_TYPE

PJSIP_TRANSPORT_METHOD_OLD_TYPE
Initial value:
1= sa.Enum(*PJSIP_TRANSPORT_METHOD_OLD_VALUES,
2 name=PJSIP_TRANSPORT_METHOD_OLD_NAME)

Definition at line 26 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ PJSIP_TRANSPORT_METHOD_OLD_VALUES

list PJSIP_TRANSPORT_METHOD_OLD_VALUES
Initial value:
1= ['default', 'unspecified', 'tlsv1', 'sslv2',
2 'sslv3', 'sslv23']

Definition at line 20 of file 37a5332640e2_update_pjsip_tls_method_list.py.

◆ revision

string revision = '37a5332640e2'

Definition at line 10 of file 37a5332640e2_update_pjsip_tls_method_list.py.