DbSchemaChecker
Installation
gem 'db_schema_checker'
Usage
$ RAILS_ENV=test bin/rails db:migrate:reset:check
Dropped database 'blog_test'
Created database 'blog_test'
ok
$ rm db/migrate/20180202012345_create_comments.rb
$ RAILS_ENV=test bin/rails db:migrate:reset:check
Dropped database 'blog_test'
Created database 'blog_test'
ERROR: Generated schema is not consistent with db/schema.rb
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kufu/db_schema_checker.
License
The gem is available as open source under the terms of the MIT License.