summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-05-03 12:41:23 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-05-03 12:41:23 -0500
commit3677409116d0ad2e638fcc2cdcf5134a2850d8ae (patch)
tree9146e6aa825fa771b20f82a2eb6f4068f727e300 /contrib
parenta2f19d82a86590c58737f252e28b816f957686ff (diff)
parent3cb8934de0db468d600beddd3464b44d33759cdc (diff)
Merge "pjsip: Added "reg_server" to contacts." into 13
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
new file mode 100644
index 000000000..8bd151bd7
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
@@ -0,0 +1,25 @@
+"""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.drop_constraint(UniqueConstraint('id'), 'ps_contacts', type_='unique')
+ 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('reg_server')
+ op.create_unique_constraint(None, 'ps_contacts', 'id')