Skip to content

Fix for duplicate uniq_agents #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmnelemane
Copy link

The names uniq_agents0agent_type0host conflicts with the unique values created by neutron db schema. This conflict throws errors due to the uniqueness constraint. This commit fixes the unique name constraint with a separate name for aim_agents.

@@ -48,7 +48,7 @@ def upgrade():
sa.Column('version', sa.String(10)),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('agent_type', 'host',
name='uniq_agents0agent_type0host'))
name='aim_agents_uniq_agents0agent_type0host'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing an existing migration file is not gonna work, as this code won't run on systems that already have AIM installed.
Please revert this file, and create a new migration HEAD that modifies the existing constraint name.

If this makes it impossible to install AIM in any particular system, then keep this file modified. But also add a new HEAD which checks the constraint name and fixes it if required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants