Unit tests rolling back my migrations

rake test:units calls db:test:prepare, which clones your development schema to your test schema. That's what's wiping out your migrations.

You should not run migrations on the test environment. Run them on the development environment before running your tests. Also, if you use autotest (which rocks by the way), you need to run rake db:test:prepare manually after the migration.