aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/database_configurations/database_config.rb4
-rw-r--r--activerecord/lib/active_record/database_configurations/hash_config.rb7
-rw-r--r--activerecord/lib/active_record/database_configurations/url_config.rb7
3 files changed, 18 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/database_configurations/database_config.rb b/activerecord/lib/active_record/database_configurations/database_config.rb
index 6250827b34..adc37cc439 100644
--- a/activerecord/lib/active_record/database_configurations/database_config.rb
+++ b/activerecord/lib/active_record/database_configurations/database_config.rb
@@ -17,6 +17,10 @@ module ActiveRecord
raise NotImplementedError
end
+ def migrations_paths
+ raise NotImplementedError
+ end
+
def url_config?
false
end
diff --git a/activerecord/lib/active_record/database_configurations/hash_config.rb b/activerecord/lib/active_record/database_configurations/hash_config.rb
index 13ffe566cf..c176a62458 100644
--- a/activerecord/lib/active_record/database_configurations/hash_config.rb
+++ b/activerecord/lib/active_record/database_configurations/hash_config.rb
@@ -38,6 +38,13 @@ module ActiveRecord
def replica?
config["replica"]
end
+
+ # The migrations paths for a database configuration. If the
+ # `migrations_paths` key is present in the config, `migrations_paths`
+ # will return its value.
+ def migrations_paths
+ config["migrations_paths"]
+ end
end
end
end
diff --git a/activerecord/lib/active_record/database_configurations/url_config.rb b/activerecord/lib/active_record/database_configurations/url_config.rb
index f526c59d56..81917fc4c1 100644
--- a/activerecord/lib/active_record/database_configurations/url_config.rb
+++ b/activerecord/lib/active_record/database_configurations/url_config.rb
@@ -48,6 +48,13 @@ module ActiveRecord
config["replica"]
end
+ # The migrations paths for a database configuration. If the
+ # `migrations_paths` key is present in the config, `migrations_paths`
+ # will return its value.
+ def migrations_paths
+ config["migrations_paths"]
+ end
+
private
def build_config(original_config, url)
if /^jdbc:/.match?(url)