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

George Joseph asteriskteam at digium.com
Thu Sep 10 10:33:40 CDT 2020


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14903 )

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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



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..f2e2841
--- /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: 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))

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

Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: Iac52c8c35030303cfa551bb39f410b33bffc507d
Gerrit-Change-Number: 14903
Gerrit-PatchSet: 6
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200910/52e7ee78/attachment.html>


More information about the asterisk-code-review mailing list