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>