Topic: Migrations and Fixtures Together
I couldn't find a way to automatically load in fixtures other than the Rake task db:fixtures:load, and even then you need to read a whole lot more to find out how to use that selectively.
After some research, digging through the Rails gems, I found a way to make it happen:
class CreateMyModel < ActiveRecord::Migration
create_table :my_models do |t|
t.column :name, :string
drop_table : my_models if (MyModel.table_exists?)
Since even the most minor error in the YAML file would cause the migration to fail, I added a rescue section which would back out any changes made so that you can retry the migration without having to manually drop the table.
I'd like to think there was a more refined way of doing this. Any ideas?