[Asterisk-code-review] realtime: Increased reg_server character size (asterisk[master])

sungtae kim asteriskteam at digium.com
Mon Aug 31 07:21:07 CDT 2020


sungtae kim has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14883 )


Change subject: realtime: Increased reg_server character size
......................................................................

realtime: Increased reg_server character size

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
---
A contrib/ast-db-manage/config/versions/1ae0609b6646_increse_reg_server_size.py
1 file changed, 22 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/83/14883/1

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
index 0000000..c53f2f1
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/1ae0609b6646_increse_reg_server_size.py
@@ -0,0 +1,22 @@
+"""increse reg server size
+
+Revision ID: 1ae0609b6646
+Revises: 61797b9fced6
+Create Date: 2020-08-31 13:50:19.772439
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '1ae0609b6646'
+down_revision = '61797b9fced6'
+
+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))

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14883
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iac52c8c35030303cfa551bb39f410b33bffc507d
Gerrit-Change-Number: 14883
Gerrit-PatchSet: 1
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200831/b9031eeb/attachment.html>


More information about the asterisk-code-review mailing list