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

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = '52798ad97bdf'
 
string revision = 'd3e4284f8707'
 
string YESNO_NAME = 'yesno_values'
 
list YESNO_VALUES = ['yes', 'no']
 

Detailed Description

add prune_on_boot to ps_subscription_persistence

Revision ID: d3e4284f8707
Revises: 52798ad97bdf
Create Date: 2018-01-28 17:45:36.218123

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 30 of file d3e4284f8707_add_prune_on_boot_to_ps_subscription_.py.

30def downgrade():
31 if op.get_context().bind.dialect.name == 'mssql':
32 op.drop_constraint('ck_ps_subscription_persistence_prune_on_boot_yesno_values','ps_subscription_persistence')
33 op.drop_column('ps_subscription_persistence', 'prune_on_boot')

◆ upgrade()

def upgrade ( )

Definition at line 21 of file d3e4284f8707_add_prune_on_boot_to_ps_subscription_.py.

21def upgrade():
22 ############################# Enums ##############################
23
24 # yesno_values have already been created, so use postgres enum object
25 # type to get around "already created" issue - works okay with mysql
26 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
27
28 op.add_column('ps_subscription_persistence', sa.Column('prune_on_boot', yesno_values))
29

Variable Documentation

◆ down_revision

string down_revision = '52798ad97bdf'

◆ revision

string revision = 'd3e4284f8707'

◆ YESNO_NAME

string YESNO_NAME = 'yesno_values'

◆ YESNO_VALUES

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