Skip to content

fix(execution_environments): add unique constraint to name#36

Draft
nadjaheitmann wants to merge 1 commit into
mainfrom
make_ee_name_unique
Draft

fix(execution_environments): add unique constraint to name#36
nadjaheitmann wants to merge 1 commit into
mainfrom
make_ee_name_unique

Conversation

@nadjaheitmann
Copy link
Copy Markdown
Contributor

@nadjaheitmann nadjaheitmann commented Mar 17, 2026

Changed the column to except only one This makes the name column unique across all organizations/locations. So you'd also get an error if you try to add a new AEE for another organization.

If you want this to work with organizations and different names across organizations, this probably needs some extra wrapping on the API side to filter by organization. Theoretically, it is also possible to have a primary key set up from two columns but this makes life unnecessary complicated and is not used in Foreman eco space.

Copy link
Copy Markdown
Contributor

@Thorben-D Thorben-D left a comment

Choose a reason for hiding this comment

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

This change will force uniqueness of Execution Environments across organizations, which is not desired.

@nadjaheitmann
Copy link
Copy Markdown
Contributor Author

This change will force uniqueness of Execution Environments across organizations, which is not desired.

On the other hand, you can remove the organization filter and then have AEEs with same name in your list. Is that desired?

@Thorben-D
Copy link
Copy Markdown
Contributor

The UI always includes the ID of the current organization.
If the user chooses to use the API without inclusion of organization_id, it is on them to correctly filter the results.

@nadjaheitmann
Copy link
Copy Markdown
Contributor Author

The UI always includes the ID of the current organization. If the user chooses to use the API without inclusion of organization_id, it is on them to correctly filter the results.

Ok, I'll come up with something else :) 🤓

@nadjaheitmann nadjaheitmann marked this pull request as draft March 24, 2026 15:34
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