Add alembic script that adds contact user_agent and endpoint message_context.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 6 Aug 2014 17:56:09 +0000 (17:56 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 6 Aug 2014 17:56:09 +0000 (17:56 +0000)
........

Merged revisions 411514 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420236 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/ast-db-manage/config/versions/3855ee4e5f85_add_missing_pjsip_options.py [new file with mode: 0644]

diff --git a/contrib/ast-db-manage/config/versions/3855ee4e5f85_add_missing_pjsip_options.py b/contrib/ast-db-manage/config/versions/3855ee4e5f85_add_missing_pjsip_options.py
new file mode 100644 (file)
index 0000000..afc1beb
--- /dev/null
@@ -0,0 +1,24 @@
+"""add_missing_pjsip_options
+
+Revision ID: 3855ee4e5f85
+Revises: 4c573e7135bd
+Create Date: 2014-03-28 10:49:04.637730
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '3855ee4e5f85'
+down_revision = '4c573e7135bd'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.add_column('ps_endpoints', sa.Column('message_context', sa.String(40)))
+    op.add_column('ps_contacts', sa.Column('user_agent', sa.String(40)))
+
+
+def downgrade():
+    op.drop_column('ps_contacts', 'user_agent')
+    op.drop_column('ps_endpoints', 'message_context')