Skip to content

Check data integrity for your ActiveRecord models

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

dsalahutdinov/activerecord-data_integrity

Repository files navigation

Dbcop

Dbcop is the cli tool to analyize the data integrity of your Rails application. It can automatically find out the lack of foreign keys in the database and many other dismisses.

Add this line to your application's Gemfile:

gem 'dbcop', group: :development

Run

Execute:

bundle exec dbcop

and you would get someting like this:

'Model User belongs to Account but has no foreign key'

Thats will make you be informed of lack of the foreign keys. :)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dbcop.

License

The gem is available as open source under the terms of the MIT License.