[asterisk-commits] alembic: Fix migration. (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 3 05:55:20 CDT 2016
Joshua Colp has submitted this change and it was merged.
Change subject: alembic: Fix migration.
......................................................................
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
---
M contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Mark Michelson: 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/81b01a191a46_pjsip_add_contact_reg_server.py b/contrib/ast-db-manage/config/versions/81b01a191a46_pjsip_add_contact_reg_server.py
index c25fc72..0318b9a 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 @@
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():
--
To view, visit https://gerrit.asterisk.org/2931
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2438b0be90b7ce583b47dd27983c0c1a02cea5b9
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list