mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 10:22:46 +00:00
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
This commit is contained in:
@@ -24,10 +24,10 @@ def upgrade():
|
||||
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))
|
||||
|
Reference in New Issue
Block a user