Commit c59d7edd authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'fix-rake-db-tasks' into 'master'

Fix `rails db:*` when the database does not exist

See merge request gitlab-org/gitlab!23806
parents 4d2f9137 5a007a8a
......@@ -6,12 +6,15 @@ if defined?(Rails::Console)
puts '-' * 80
puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision})"
puts " GitLab Shell:".ljust(justify) + "#{Gitlab::VersionInfo.parse(Gitlab::Shell.new.version)}"
puts " #{Gitlab::Database.human_adapter_name}:".ljust(justify) + Gitlab::Database.version
Gitlab.ee do
if Gitlab::Geo.enabled?
puts " Geo enabled:".ljust(justify) + 'yes'
puts " Geo server:".ljust(justify) + EE::GeoHelper.current_node_human_status
if Gitlab::Database.exists?
puts " #{Gitlab::Database.human_adapter_name}:".ljust(justify) + Gitlab::Database.version
Gitlab.ee do
if Gitlab::Geo.connected? && Gitlab::Geo.enabled?
puts " Geo enabled:".ljust(justify) + 'yes'
puts " Geo server:".ljust(justify) + EE::GeoHelper.current_node_human_status
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment