Asterisk - The Open Source Telephony Project  18.5.0
b80485ff4dd0_add_pjsip_endpoint_acn_options.py
Go to the documentation of this file.
1 """Add pjsip endpoint ACN options
2 
3 Revision ID: b80485ff4dd0
4 Revises: fbb7766f17bc
5 Create Date: 2020-07-06 08:29:53.974820
6 
7 """
8 
9 # revision identifiers, used by Alembic.
10 revision = 'b80485ff4dd0'
11 down_revision = '79290b511e4b'
12 
13 from alembic import op
14 import sqlalchemy as sa
15 
16 max_value_length = 128
17 
18 def upgrade():
19  op.add_column('ps_endpoints', sa.Column('codec_prefs_incoming_offer', sa.String(max_value_length)))
20  op.add_column('ps_endpoints', sa.Column('codec_prefs_outgoing_offer', sa.String(max_value_length)))
21  op.add_column('ps_endpoints', sa.Column('codec_prefs_incoming_answer', sa.String(max_value_length)))
22  op.add_column('ps_endpoints', sa.Column('codec_prefs_outgoing_answer', sa.String(max_value_length)))
23 
24 
25 def downgrade():
26  op.drop_column('ps_endpoints', 'codec_prefs_incoming_offer')
27  op.drop_column('ps_endpoints', 'codec_prefs_outgoing_offer')
28  op.drop_column('ps_endpoints', 'codec_prefs_incoming_answer')
29  op.drop_column('ps_endpoints', 'codec_prefs_outgoing_answer')