Fix gitlab-psql and gitlab-geo-psql to default to known database based in Omnibus config
The following discussion from !2487 (merged) should be addressed:
-
@stanhu started a discussion: (+2 comments) Could we default to
gitlab_geo_production
as the default database?
By rewriting it in ruby, we can use something like OptionParse to handle -d database
and default to gitlab's one when nothing is specified.
This would allow us to run just gitlab-psql
and get into gitlabhq_production
or override it to -d somethingelse
It looks like it's possible to add parameters and override then after so the later takes precedence. This allows us to use current bash script + some modifications in gitlab-psql-rc
and geo equivalent
Edited by Gabriel Mazetto