Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-29 18:09:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-29 18:09:48 +0300
commitf4d51a9f71cf3d4b0874a3e1948fe3c1ea193c4d (patch)
tree7ae3da76e824c435167dd108721c0124ad2ee484 /doc/development/verifying_database_capabilities.md
parent2dedd78ef505a0ab0a379c7340a3fcba56ada663 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/verifying_database_capabilities.md')
-rw-r--r--doc/development/verifying_database_capabilities.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/verifying_database_capabilities.md b/doc/development/verifying_database_capabilities.md
index 195e8c5c77e..a6575dc79f8 100644
--- a/doc/development/verifying_database_capabilities.md
+++ b/doc/development/verifying_database_capabilities.md
@@ -12,13 +12,13 @@ necessary to add database (version) specific behavior.
To facilitate this we have the following methods that you can use:
-- `Gitlab::Database.version`: returns the PostgreSQL version number as a string
+- `Gitlab::Database.main.version`: returns the PostgreSQL version number as a string
in the format `X.Y.Z`.
This allows you to write code such as:
```ruby
-if Gitlab::Database.version.to_f >= 11.7
+if Gitlab::Database.main.version.to_f >= 11.7
run_really_fast_query
else
run_fast_query
@@ -30,7 +30,7 @@ end
The database can be used in read-only mode. In this case we have to
make sure all GET requests don't attempt any write operations to the
database. If one of those requests wants to write to the database, it needs
-to be wrapped in a `Gitlab::Database.read_only?` or `Gitlab::Database.read_write?`
+to be wrapped in a `Gitlab::Database.main.read_only?` or `Gitlab::Database.main.read_write?`
guard, to make sure it doesn't for read-only databases.
We have a Rails Middleware that filters any potentially writing