"be consistent" | |
PerlMonks |
Re^2: DBIx::Class Randomise datbase primary keys for testing.by afoken (Chancellor) |
on Nov 24, 2010 at 14:04 UTC ( [id://873447]=note: print w/replies, xml ) | Need Help?? |
If one creates a complete database scheme just for testing, as done in the original post, inserting a random number of dummy records into each of the tables could be sufficient. On a RDBMS with real sequences (like Oracle), creating the sequences in a way that they start at a random number should give a similar effect. A different approach, again needing sequences, would be to use a single sequence to generate all IDs, at least for the test database. That would reliably detect that special problem of using IDs from a wrong table. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|