You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a new constraint to ensure phyobj.code are unique for given physobj.type.
The idea would be to add a boolean field ensure_unique on PhysObj.Type to make it configurable. As I would suggest that AWB-core do not assume how PhysObj.code are used by developer, probably some developer use PhysObj.code field to collect lot number which require to allow duplicated code for this given PhysObj.Type
note: I've checked that PhysObj.code is nullable and (posgre)SQL consider Null as different value in this kind of unique constraint so even the ensure_unique is true that would let developers to unpack PhysObj with null value in a first step and assign the code afterwards in his workflow.
Does this is useful to share ? Can I create a PR to improve AWB-core directly or should I create a dedicated blok somewhere else ?
Regards,
The text was updated successfully, but these errors were encountered:
petrus-v
changed the title
Proposal Unique (physob.code, pysobj.type) Constraint defined per phyobj.Type
Proposal Unique (PhysObj.code, PhysObj.type) Constraint defined per PhysObj.Type
Jul 23, 2021
Hi there !
I'd like to propose a new constraint to ensure phyobj.code are unique for given physobj.type.
The idea would be to add a boolean field
ensure_unique
onPhysObj.Type
to make it configurable. As I would suggest that AWB-core do not assume howPhysObj.code
are used by developer, probably some developer use PhysObj.code field to collect lot number which require to allow duplicated code for this givenPhysObj.Type
Does this is useful to share ? Can I create a PR to improve AWB-core directly or should I create a dedicated blok somewhere else ?
Regards,
The text was updated successfully, but these errors were encountered: