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

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = 'f3d1c5d38b56'
 
string revision = 'b83645976fdd'
 
string SHA_HASH_NAME = 'sha_hash_values'
 
list SHA_HASH_VALUES = ['SHA-1', 'SHA-256']
 

Detailed Description

add dtls_fingerprint to ps_endpoints

Revision ID: b83645976fdd
Revises: f3d1c5d38b56
Create Date: 2017-08-03 09:01:49.558111

Function Documentation

◆ downgrade()

def b83645976fdd_add_dtls_fingerprint_to_ps_endpoints.downgrade ( )

Definition at line 31 of file b83645976fdd_add_dtls_fingerprint_to_ps_endpoints.py.

31 def downgrade():
32  context = op.get_context()
33 
34  if context.bind.dialect.name == 'mssql':
35  op.drop_constraint('ck_ps_endpoints_dtls_fingerprint_sha_hash_values', 'ps_endpoints')
36  op.drop_column('ps_endpoints', 'dtls_fingerprint')
37 
38  if context.bind.dialect.name == 'postgresql':
39  enum = ENUM(*SHA_HASH_VALUES, name=SHA_HASH_NAME)
40  enum.drop(op.get_bind(), checkfirst=False)

◆ upgrade()

def b83645976fdd_add_dtls_fingerprint_to_ps_endpoints.upgrade ( )

Definition at line 20 of file b83645976fdd_add_dtls_fingerprint_to_ps_endpoints.py.

20 def upgrade():
21  context = op.get_context()
22 
23  if context.bind.dialect.name == 'postgresql':
24  enum = ENUM(*SHA_HASH_VALUES, name=SHA_HASH_NAME)
25  enum.create(op.get_bind(), checkfirst=False)
26 
27  op.add_column('ps_endpoints',
28  sa.Column('dtls_fingerprint', ENUM(*SHA_HASH_VALUES,
29  name=SHA_HASH_NAME, create_type=False)))
30 

Variable Documentation

◆ down_revision

string down_revision = 'f3d1c5d38b56'

◆ revision

string revision = 'b83645976fdd'

◆ SHA_HASH_NAME

string SHA_HASH_NAME = 'sha_hash_values'

◆ SHA_HASH_VALUES

list SHA_HASH_VALUES = ['SHA-1', 'SHA-256']