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

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = '0838f8db6a61'
 
string PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME = 'pjsip_taskprocessor_overload_trigger_values'
 
list PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES = ['none', 'global', 'pjsip_only']
 
string revision = 'f3c0b8695b66'
 

Detailed Description

taskprocessor_overload_trigger

Revision ID: f3c0b8695b66
Revises: 0838f8db6a61
Create Date: 2019-02-15 15:03:50.106790

Function Documentation

◆ downgrade()

def f3c0b8695b66_taskprocessor_overload_trigger.downgrade ( )

Definition at line 33 of file f3c0b8695b66_taskprocessor_overload_trigger.py.

33 def downgrade():
34  context = op.get_context()
35 
36  if context.bind.dialect.name == 'mssql':
37  op.drop_constraint('ck_ps_globals_taskprocessor_overload_trigger_pjsip_taskprocessor_overload_trigger_values', 'ps_globals')
38  op.drop_column('ps_globals', 'taskprocessor_overload_trigger')
39 
40  if context.bind.dialect.name == 'postgresql':
41  enum = ENUM(*PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES,
42  name=PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME)
43  enum.drop(op.get_bind(), checkfirst=False)

◆ upgrade()

def f3c0b8695b66_taskprocessor_overload_trigger.upgrade ( )

Definition at line 20 of file f3c0b8695b66_taskprocessor_overload_trigger.py.

20 def upgrade():
21  context = op.get_context()
22 
23  if context.bind.dialect.name == 'postgresql':
24  enum = ENUM(*PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES,
25  name=PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME)
26  enum.create(op.get_bind(), checkfirst=False)
27 
28  op.add_column('ps_globals',
29  sa.Column('taskprocessor_overload_trigger',
30  sa.Enum(*PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES,
31  name=PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME)))
32 

Variable Documentation

◆ down_revision

string down_revision = '0838f8db6a61'

◆ PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME

string PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME = 'pjsip_taskprocessor_overload_trigger_values'

◆ PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES

list PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES = ['none', 'global', 'pjsip_only']

◆ revision

string revision = 'f3c0b8695b66'