]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
realtime: Increased reg_server character size
authorSungtae Kim <pchero21@gmail.com>
Mon, 31 Aug 2020 12:21:09 +0000 (14:21 +0200)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 10 Sep 2020 15:33:38 +0000 (10:33 -0500)
Currently, the ps_contacts table's reg_server column in realtime database type is varchar(20).
This is fine for normal cases, but if the hostname is longer than 20, it returns error and then
failed to register the contact address of the peer.

Normally, 20 characters limitation for the hostname is fine, but with the cloud env.
So, increased the size to 255.

ASTERISK-29056

Change-Id: Iac52c8c35030303cfa551bb39f410b33bffc507d

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

diff --git a/contrib/ast-db-manage/config/versions/1ae0609b6646_increse_reg_server_size.py b/contrib/ast-db-manage/config/versions/1ae0609b6646_increse_reg_server_size.py
new file mode 100644 (file)
index 0000000..f2e2841
--- /dev/null
@@ -0,0 +1,22 @@
+"""increse reg server size
+
+Revision ID: 1ae0609b6646
+Revises: 79290b511e4b
+Create Date: 2020-08-31 13:50:19.772439
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '1ae0609b6646'
+down_revision = '79290b511e4b'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.alter_column('ps_contacts', 'reg_server', type_=sa.String(255))
+
+
+def downgrade():
+    op.alter_column('ps_contacts', 'reg_server', type_=sa.String(20))