solidusio / solidus_dev_support

A collection of tools for developing Solidus extensions.
MIT License
21 stars 27 forks source link

Verify Rails version in migrations #160

Closed aldesantis closed 1 year ago

aldesantis commented 3 years ago

It would be helpful to have an automated check that ensures migrations all use the earliest Rails version supported by Solidus. For instance, if Solidus supports Rails 5.1+, all migrations in extensions should inherit from ActiveRecord::Migration[5.1].

Otherwise, a migration that inherits from ActiveRecord::Migration[6.0] will not run on any applications that use 5.x.

This could either be a runtime check in the CI or a static RuboCop check.