Class: Combustion::Database::Migrate

Inherits:
Object
  • Object
show all
Defined in:
lib/combustion/database/migrate.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject


4
5
6
# File 'lib/combustion/database/migrate.rb', line 4

def self.call
  new.call
end

Instance Method Details

#callObject


8
9
10
11
12
13
14
15
16
# File 'lib/combustion/database/migrate.rb', line 8

def call
  if ActiveRecord::VERSION::STRING.to_f >= 5.2
    migration_context.migrate
  elsif ActiveRecord::VERSION::STRING.to_f >= 3.1
    migrator.migrate paths, nil
  else
    paths.each { |path| migrator.migrate path, nil }
  end
end