mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 02:18:31 +00:00
Fix Alembic upgrades.
A non-existent constraint was being referenced in the upgrade script. This patch corrects the problem by removing the reference. This patch fixes another realtime problem as well. Our Alembic scripts store booleans as yes or no values. However, Sorcery tries to insert "true" or "false" instead. This patch updates Sorcery to use "yes" and "no" ASTERISK-26128 #close Change-Id: I366dbbf91418a9cb160b3ca74b0e59b5ac284bec
This commit is contained in:
@@ -16,10 +16,8 @@ import sqlalchemy as sa
|
||||
|
||||
def upgrade():
|
||||
op.add_column('ps_contacts', sa.Column('reg_server', sa.String(20)))
|
||||
op.drop_constraint('id', 'ps_contacts', type_='unique')
|
||||
op.create_unique_constraint('ps_contacts_uq', 'ps_contacts', ['id','reg_server'])
|
||||
|
||||
def downgrade():
|
||||
op.drop_constraint('ps_contacts_uq', 'ps_contacts', type_='unique')
|
||||
op.drop_column('ps_contacts', 'reg_server')
|
||||
op.create_unique_constraint(None, 'ps_contacts', 'id')
|
||||
|
Reference in New Issue
Block a user