Make Gitlab database library compatible with Rails 6.1

Summary

  1. Rails 6.0 triggers the following deprecation warning:
DEPRECATION WARNING: Accessing hashes returned from config_for by non-symbol keys is deprecated and will be removed in Rails 6.1. Use symbols for access instead.

That means that accessing database configuration values by string key is no longer working in Rails 6.1.

  1. A database now has multiple configurations due to introduced support for horizontal sharding.

The changelog is here: https://github.com/rails/rails/blob/6-1-stable/activerecord/CHANGELOG.md

Current work

The Rails Upgrade MR introduces the changes that fixes some of the tests:

Let's check whether these changes are compatible with Rails 6.0 and are reasonable to be merged 🚀

Confidence level 75%

Edited by Thong Kuah