I've seen some plugins and custom rake tasks to dump the active db to fixtures, but I'm not sure what the prevailing technique is.
Basically, I want the opposite of rake:db:fixtures:load so that I can put basic db information (the admin user account, for one) into svn for when we deploy. I don't want to have to create fixtures manually for things like sample data that would take a long time.
When we deploy I want to be able to just run
rake db:migrate
rake db:fixtures:load
And be off to the races.
What is the best/preferred method for doing this in rails?
EDIT:
So it seems there is no standard way to do an opposite rake task of db:fixtures:load.
I don't want to use migrations, because I want a standard way of doing this for all my projects, and I don't like the idea of putting any more than maybe the admin account in a migration. Second, I've been rethinking the idea of using the fixtures. I've decided on using yaml_db because it uses rake tasks:
rake db:data:dump
rake db:data:load
The data will wind up in a YAML file without distrupting test fixtures (which could be different, now that I think about this more carefully). Also, if a major distribution tool like Heroku is using it, I don't have to worry about support/longevity issues.
I suppose this is closest to "standard" that I will find.
Thanks for all the great responses.