~singpolyma/asterisk

ref: upstream/16.2.1_dfsg asterisk/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py -rw-r--r-- 586 bytes
fe6d69c0Stephen Paul Weber import-tar 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""pjsip: add contact reg_server

Revision ID: 81b01a191a46
Revises: 65eb22eb195
Create Date: 2016-04-15 15:00:35.024525

"""

# revision identifiers, used by Alembic.
revision = '81b01a191a46'
down_revision = '65eb22eb195'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('ps_contacts', sa.Column('reg_server', sa.String(20)))
    op.create_unique_constraint('ps_contacts_uq', 'ps_contacts', ['id','reg_server'])

def downgrade():
    op.drop_constraint('ps_contacts_uq', 'ps_contacts', type_='unique')
    op.drop_column('ps_contacts', 'reg_server')