StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateDoorkeeperTables < ActiveRecord::Migration[4.2]
I fixed this for me by editing db/migrate/..._create_doorkeeper_tables.rb to have its first line be:
class CreateDoorkeeperTables < ActiveRecord::Migration[5.1]
The code generation probably wants to detect the Rails version and put it in?
@maclover7 I think we need to fix it for Rails >= 5.0. Different folders for different templates (aka "4.x" and "5.x) ? Or gsub_file to insert migration versions into templates if Rails version >= 5.0 (i think it is a preferable way)?
@nbulaj I correctly understood. You want to gsub in 'db/migrate/create_doorkeeper_tables.rb' version of migration?
@DmitryBash yep, it is a possible solution - gsub a migration from the generator (install action) by adding the version for later Rails.
Solved via #981.
Most helpful comment
I fixed this for me by editing
db/migrate/..._create_doorkeeper_tables.rbto have its first line be:The code generation probably wants to detect the Rails version and put it in?