rubocop / rubocop-sequel

Code style checking for Sequel
MIT License
28 stars 14 forks source link

Feature: Migrations require up/down methods instead of change when not automatically-reversible #30

Open TSMMark opened 1 year ago

TSMMark commented 1 year ago

A migration file that uses migration methods like set_column_type, or other non-reversible ones mentioned here https://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html#label-A+Basic+Migration is not reversible automatically, and should require specific up/down methods in migrations in projects where reversibility is important. I imagine a rubocop rule could check for this.

Curious if maintainers would merge a PR that adds a new cop for this?

cyberdelia commented 1 year ago

Most likely we would accept something like that.