PJSIP: Add Path header support
[asterisk/asterisk.git] / contrib / ast-db-manage / config / versions / 2fc7930b41b3_add_pjsip_endpoint_options_for_12_1.py
1 """Add pjsip endpoint options for 12.1
2
3 Revision ID: 2fc7930b41b3
4 Revises: 581a4264e537
5 Create Date: 2014-01-14 09:23:53.923454
6
7 """
8
9 # revision identifiers, used by Alembic.
10 revision = '2fc7930b41b3'
11 down_revision = '581a4264e537'
12
13 from alembic import op
14 import sqlalchemy as sa
15
16 YESNO_VALUES = ['yes', 'no']
17 REDIRECT_METHODS = ['user', 'uri_core', 'uri_pjsip']
18
19 def upgrade():
20     op.add_column('ps_endpoints', sa.Column('redirect_method', sa.Enum(*REDIRECT_METHODS, name='redirect_methods')))
21     op.add_column('ps_endpoints', sa.Column('set_var', sa.Text()))
22     op.add_column('ps_contacts', sa.Column('path', sa.Text()))
23     op.add_column('ps_aors', sa.Column('support_path', sa.Enum(*YESNO_VALUES, name='yesno_values')))
24     op.add_column('ps_registrations', sa.Column('support_path', sa.Enum(*YESNO_VALUES, name='yesno_values')))
25
26
27 def downgrade():
28     op.drop_column('ps_endpoints', 'redirect_method')
29     op.drop_column('ps_endpoints', 'set_var')
30     op.drop_column('ps_contacts', 'path')
31     op.drop_column('ps_aors', 'support_path')
32     op.drop_column('ps_registrations', 'support_path')