Make some database tasks methods private

These were never supposed to be public and they aren't very useful
outside of database tasks so make them private.
This commit is contained in:
eileencodes 2023-03-08 12:06:05 -05:00
parent 6f50d40d30
commit 3bfd559b6a
No known key found for this signature in database
GPG Key ID: BA5C575120BBE8DF

@ -129,13 +129,13 @@ def create_all
migration_class.establish_connection(db_config)
end
def setup_initial_database_yaml
def setup_initial_database_yaml # :nodoc:
return {} unless defined?(Rails)
Rails.application.config.load_database_yaml
end
def for_each(databases)
def for_each(databases) # :nodoc:
return {} unless defined?(Rails)
database_configs = ActiveRecord::DatabaseConfigurations.new(databases).configs_for(env_name: Rails.env)
@ -150,7 +150,7 @@ def for_each(databases)
end
end
def raise_for_multi_db(environment = env, command:)
def raise_for_multi_db(environment = env, command:) # :nodoc:
db_configs = configs_for(env_name: environment)
if db_configs.count > 1