-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add postgres schema to the search_path on database connection #12634
Add postgres schema to the search_path on database connection #12634
Conversation
Rather than rely on the user running the gitea server and db setting the schema search_path correctly - if gitea is run with a schema we should simply set the search_path to have that schema first in the path. Fix go-gitea#12505 Signed-off-by: Andrew Thornton <art27@cantab.net>
e1e2cb9
to
1e75afc
Compare
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Codecov Report
@@ Coverage Diff @@
## master #12634 +/- ##
==========================================
- Coverage 43.19% 43.15% -0.05%
==========================================
Files 651 651
Lines 72138 72145 +7
==========================================
- Hits 31163 31136 -27
- Misses 35928 35955 +27
- Partials 5047 5054 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it'd be wise to quote the schema name in case it contains uppercase characters, but other than that lgtm.
🚀 |
Rather than rely on the user running the gitea server and db setting the
schema search_path correctly - if Gitea is run with a schema we should
simply set the search_path to have that schema first in the path.
Fix #12505
Signed-off-by: Andrew Thornton art27@cantab.net