Class: LazyMigrate::MigratorAdapterFactory
- Inherits:
-
Object
- Object
- LazyMigrate::MigratorAdapterFactory
- Defined in:
- lib/lazy_migrate/migrator_adapter_factory.rb
Class Method Summary collapse
-
.create_migrator_adapter ⇒ Object
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.
Class Method Details
.create_migrator_adapter ⇒ Object
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
14 15 16 17 18 19 20 |
# 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 |