I’ve realized with a shock that when I run tests on my app the db
cloning code in test setup does NOT copy views or triggers into the test
db. Since views (and to a lesser extent) triggers are central to
portions of my app this is a problem. I can work around it by doing the
copy of views and triggers manually. This works reasonably easily
because the cloning code does not seem to remove views and triggers that
are already in the test db. As long as I am not changing these often I
can accept this form of maintenance. However, it would be much better to
have the cloning code understand views and triggers. I’ve seen efforts
to use migrations to keep the test db in synch with the development db.
However, the current use of migrations to handle changes to the
development db and then cloning at test time seems to make sense.
It looks like that could be accomplished without too much difficulty by
changes in structure_dump in mysql_adapter.rb and to supporting
routines. I’m tempted to try it but this clearly pushes the limits of my
abilities and knowlege. It would take some time.
Is there anybody already doing this? Are similar efforts needed for
postgres et.al.?
mitch