As a follow-on to an earlier question about not reloading a huge, persistent table when I run my tests, I need to keep this table out of schema.rb when I run my migrations. This table gets loaded directly from a mysqldump, so I’m not worried about keeping track of it.
So, how can I keep a specific table out of schema.rb?
Turns out there’s an option for just this situation!
I found it in
activerecord-2.3.4/lib/active_record/schema_dumper.rb:So all I had to do was stick this at the end of environment.rb:
If ActiveRecord.schema_format == :ruby, the array can also contain RegExp. For example, to ignore all tables starting with "MS":