amatsuda / database_rewinder

minimalist's tiny and ultra-fast database cleaner
MIT License
807 stars 91 forks source link

DatabaseRewinder should not delete internal metadata table #39

Closed akihiro17 closed 8 years ago

akihiro17 commented 8 years ago

This commit fixes the following error in Rails 5.0.

$ bundle exec rspec spec # DatabaseRewinder deletes the internal metadata table
------
DELETE FROM `ar_internal_metadata`;
------
$ RAILS_ENV=test bundle exec rake db:migrate reset
rake aborted!
ActiveRecord::NoEnvironmentInSchemaError:

Environment data not found in the schema. To resolve this issue, run:

        bin/rails db:environment:set RAILS_ENV=test

Tasks: TOP => db:migrate:reset => db:drop => db:check_protected_environments
(See full trace by running task with --trace)
amatsuda commented 8 years ago

@akihiro17 Thank you!!

amatsuda commented 8 years ago

Just released version 0.6.2 gem including this fix.

akihiro17 commented 8 years ago

@amatsuda Thank you