Recently I’ve wanted to be able to take the data I’ve painstakingly
defined in my fixture files and slurp it up into my development database
so I can play with my website (locally, in development mode) with the
same data I use in my tests.
In a similar vein, I want to take the table definitions in the
development_structure.sql file and use it to re-define my development
database schema. Unless I’m missing something obvious, when someone
changes the db schema commits it into our subversion repository, I
always have to hand-update my development db to match the new schema (if
I don’t want to toast the data that’s already in there), or fire up my
db tool, drop all the databases, then execute the _structure.sql script
(and lose all my data).
Is there already something in rails that can do one or both of these for
I guess I could take a whack at writing a couple of rake tasks, but I’m
hoping that surely someone else has already written these already?