lib/combustion/database.rb in combustion-0.5.2 vs lib/combustion/database.rb in combustion-0.5.3
- old
+ new
@@ -55,14 +55,19 @@
end
end
def self.migrate
migrator = ActiveRecord::Migrator
- paths = Array('db/migrate/')
if migrator.respond_to?(:migrations_paths)
paths = migrator.migrations_paths
+ else
+ paths = Array('db/migrate/')
end
+
+ paths += Rails.application.paths['db/migrate'].to_a
+ paths.uniq!
+
# Append the migrations inside the internal app's db/migrate directory
paths << File.join(Rails.root, 'db/migrate')
if ActiveRecord::VERSION::STRING >= '3.1.0'
migrator.migrate paths, nil