Skip to content

RuboCop extension focused on ActiveRecord migration.

License

Notifications You must be signed in to change notification settings

r7kamura/rubocop-migration

Repository files navigation

rubocop-migration

ci

RuboCop extension focused on ActiveRecord migration.

Usage

Install rubocop-migration gem:

# Gemfile
gem 'rubocop-migration', require: false

then require rubocop-migration and enable the cops you want to use in your .rubocop.yml:

# .rubocop.yml
require:
  - rubocop-migration

Migration/AddCheckConstraint:
  Enabled: true

Note that all cops are Enabled: false by default.

Cops

Please read the comments of the respective cop classes for more information.

Acknowledgements

This gem was heavily inspired by ankane/strong_migrations.

The gem rubocop-migration was originally developed at wealthsimple/rubocop-migration, and later the gem name was transferred to this repository.

Some cops were originally created at r7kamura/sevencop then moved to this repository.

About

RuboCop extension focused on ActiveRecord migration.

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project