alembic: increase uri column size
authorFlorian Floimair <f.floimair@commend.com>
Thu, 23 Aug 2018 11:57:31 +0000 (13:57 +0200)
committerFlorian Floimair <f.floimair@commend.com>
Thu, 23 Aug 2018 12:05:33 +0000 (14:05 +0200)
When mobile SIP clients register with Asterisk that use some sort of
push notifications, the URI can get quite lengthy due to the
additional push-service annotations (things like tokens, pn-type, etc.)
contained in it.

ASTERISK-28022 #close

Change-Id: I4c7ceadc3bb405f3daf722641c8cd5ca4188cc37

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

diff --git a/contrib/ast-db-manage/config/versions/1d3ed26d9978_increase_uri_column_size.py b/contrib/ast-db-manage/config/versions/1d3ed26d9978_increase_uri_column_size.py
new file mode 100644 (file)
index 0000000..d00d0fa
--- /dev/null
@@ -0,0 +1,22 @@
+"""Increase uri column size
+
+Revision ID: 1d3ed26d9978
+Revises: 19b00bc19b7b
+Create Date: 2018-08-23 11:46:13.283801
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '1d3ed26d9978'
+down_revision = '19b00bc19b7b'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.alter_column('ps_contacts', 'uri', type_=sa.String(511))
+
+
+def downgrade():
+    op.alter_column('ps_contacts', 'uri', type_=sa.String(255))