class LazyMigrate::MigratorAdapterFactory
Public Class Methods
create_migrator_adapter()
click to toggle source
unfortunately the code is a little different from 5.2 onwards compared to previous versions, and we want to do more than just invoke the db:migrate rake commands so we're returning a different adapter depending on the rails version
# File lib/lazy_migrate/migrator_adapter_factory.rb, line 14 def create_migrator_adapter if Rails.version > '5.2.0' LazyMigrate::NewMigratorAdapter.new else LazyMigrate::OldMigratorAdapter.new end end