From: Joshua Colp Date: Thu, 2 Jun 2016 09:59:06 +0000 (-0300) Subject: alembic: Fix migration. X-Git-Tag: 13.10.0-rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cda33854091eabf243dee228b92da3fcaa5bb5e3;p=thirdparty%2Fasterisk.git alembic: Fix migration. The 81b01a191a46_pjsip_add_contact_reg_server.py script was attempting to use UniqueConstraint and failing. It was not imported and after importing it also continued to fail. I've changed the script to use the explicit name of the constraint instead. Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9 --- diff --git a/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py index c25fc72335..0318b9a4fc 100644 --- a/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py +++ b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py @@ -16,7 +16,7 @@ import sqlalchemy as sa def upgrade(): op.add_column('ps_contacts', sa.Column('reg_server', sa.String(20))) - op.drop_constraint(UniqueConstraint('id'), 'ps_contacts', type_='unique') + op.drop_constraint('id', 'ps_contacts', type_='unique') op.create_unique_constraint('ps_contacts_uq', 'ps_contacts', ['id','reg_server']) def downgrade():