class ActiveRecord::Migrator
Public Class Methods
migrations_paths()
click to toggle source
# File lib/multi_db/active_record_patches.rb, line 79 def migrations_paths @migrations_paths ||= ['db/migrate'] # just to not break things if someone uses: migration_path = some_string paths = Array.wrap(@migrations_paths) case ENV['RAILS_ORG'] when 'sessions', 'master' paths.map { |path| "#{path}/#{ENV['RAILS_ORG']}" } else paths.map { |path| "#{path}/org" } end end
new(direction, migrations_paths, target_version = nil)
click to toggle source
# File lib/multi_db/active_record_patches.rb, line 65 def initialize(direction, migrations_paths, target_version = nil) if ENV['RAILS_ORG'] == 'master' Base.connect_to_master elsif ENV['RAILS_ORG'] == 'sessions' Base.connect_to_sessions else Base.connect_to_organization end initialize_without_multidb(direction, migrations_paths, target_version) end
Also aliased as: initialize_without_multidb