[asterisk-commits] Fix sqlalchemy error regarding identifier length. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jul 23 16:54:28 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: Fix sqlalchemy error regarding identifier length.
......................................................................


Fix sqlalchemy error regarding identifier length.

sqlalchemy was complaining:

sqlalchemy.exc.IdentifierError: Identifier
'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30
characters

This fixes the problem by changing the index name to be
"ps_contacts_qualifyfreq_exp" instead.

ASTERISK-26227 #close
Reported by Mark Michelson

Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9
---
M contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py b/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
index ff18343..43d4028 100644
--- a/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
+++ b/contrib/ast-db-manage/config/versions/ef7efc2d3964_ps_contacts_add_endpoint_and_modify_.py
@@ -24,10 +24,10 @@
     else:
         op.execute('ALTER TABLE ps_contacts ALTER COLUMN expiration_time TYPE BIGINT USING expiration_time::bigint')
 
-    op.create_index('ps_contacts_qualifyfreq_exptime', 'ps_contacts', ['qualify_frequency', 'expiration_time'])
+    op.create_index('ps_contacts_qualifyfreq_exp', 'ps_contacts', ['qualify_frequency', 'expiration_time'])
     op.create_index('ps_aors_qualifyfreq_contact', 'ps_aors', ['qualify_frequency', 'contact'])
 def downgrade():
     op.drop_index('ps_aors_qualifyfreq_contact')
-    op.drop_index('ps_contacts_qualifyfreq_exptime')
+    op.drop_index('ps_contacts_qualifyfreq_exp')
     op.drop_column('ps_contacts', 'endpoint')
     op.alter_column('ps_contacts', 'expiration_time', type_=sa.String(40))

-- 
To view, visit https://gerrit.asterisk.org/3316
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list