]> 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)
committerMason James <mtj@kohaaloha.com>
Fri, 2 Oct 2015 12:51:49 +0000 (01:51 +1300)
commit0bac7826012b3536bfa62bf2fc1adee91da55b26
tree2703045c3842b3c6a9ae4d8aca9c44a0713bd54d
parent4c9abf7673d2ba02d02fd82c0d04fc4c7405017f
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: Mason James <mtj@kohaaloha.com>
t/lib/TestBuilder.pm [new file with mode: 0644]