fix(execution_environments): add unique constraint to name#36
fix(execution_environments): add unique constraint to name#36nadjaheitmann wants to merge 1 commit into
Conversation
Thorben-D
left a comment
There was a problem hiding this comment.
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? |
|
The UI always includes the ID of the current organization. |
Ok, I'll come up with something else :) 🤓 |
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.