]> git.koha-community.org Git - koha.git/commit
Bug 14256: Check for unique constraint to regenerate random data
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 3 Jun 2015 18:54:57 +0000 (15:54 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 10 Jun 2015 15:47:06 +0000 (12:47 -0300)
commit395304d3b58d79bb1306c4e6f799548e2d875356
tree1ba2bcb817a01733dc579d0ec25049aa7e895e1c
parent0002126a2ab0ac38a8d3f144f446dc3ba69dab59
Bug 14256: Check for unique constraint to regenerate random data

Unique constraints should be checked when creating random data. Otherwise
we get failures when the generated data already exists on the DB.

This patch takes advantage of ->unique_constraints() to do the job,
looping through all the unique constraints defined for the source.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/lib/TestBuilder.pm