]> 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)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 11 Jun 2015 20:06:02 +0000 (08:06 +1200)
commit47159b672e8328b66673fb9253bbecb75a5a69dd
treed4842325788e37b273e66fd24e1efd522ab3ad0d
parenta47a89fa472e434f0dafccd991fa7991d5efe830
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>
(cherry picked from commit 395304d3b58d79bb1306c4e6f799548e2d875356)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
t/lib/TestBuilder.pm