Koha/api/v1/swagger/definitions/erm_user_role.yaml
Pedro Amorim 22e78b5ffa
Bug 32154: Missing primary key on erm_user_roles table
The aforementioned TestBuilder should display "Koha::ERM::UserRole", not be empty.

This patch adds a primary key to the erm_user_roles table and fixes that.

Also includes atomicupdate file to update database schema as well as updates to
kohastructure.sql provided by Jonathan Druart.

Looked into the vue files but didn't find anywhere or a need to include the new
primary key in any of the requests as there is no request of users by role_user_id
being made.

Erm users are being created/updated as a relationship through licenceses/agreements.

Furthermore, when editing a role of an existing user, this new primary key is already
being supplied embeded in the license/agreement.

Test plan:
Add users to license and agreement
Run the cypress tests
Confirm that the change fix the test that was failing in TestBuilder.t
(another one may still fail however)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-11 08:54:34 -03:00

31 lines
563 B
YAML

---
type: object
properties:
user_role_id:
type: integer
description: Internal user_role identifier
agreement_id:
type:
- integer
- "null"
description: Internal agreement identifier
license_id:
type:
- integer
- "null"
description: Internal license identifier
user_id:
type: integer
description: Internal patron identifier
role:
description: role of the user
type:
- string
patron:
type:
- object
- "null"
additionalProperties: false
required:
- user_id
- role