Rails db: always put main first
What does this MR do?
Always place main
stanza of database.yml
first. As Rails expects primary
instead of main
, it is possible that the following results in a bad template, due to hash entry order when using .range
. This is unlikely, but possible. As a result, force the keys
list to return
with main
first so that the output always matches:
production
main:
...
ci:
...
other:
...
See gitlab-org/omnibus-gitlab#6372 (closed) for details.
Related issues
Related to gitlab-org/omnibus-gitlab#6372 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened