# HG changeset patch # User Harsh Chouraria <hchouraria@gitlab.com> # Date 1634875327 0 # Fri Oct 22 04:02:07 2021 +0000 # Node ID b7c26bfde2772654a62e21d60693df05b15e77e0 # Parent 1324185799582d8ae50eb7339be90f9cc99729e9 Clarify disabling DB migrations diff --git a/doc/settings/database.md b/doc/settings/database.md --- a/doc/settings/database.md +++ b/doc/settings/database.md @@ -948,20 +948,20 @@ If you have multiple GitLab servers sharing a database, you will want to limit the number of nodes that are performing the migration steps during reconfiguration. -Edit `/etc/gitlab/gitlab.rb`: +Edit `/etc/gitlab/gitlab.rb` to append: ```ruby # Enable or disable automatic database migrations +# on all hosts except the designated deploy node gitlab_rails['auto_migrate'] = false ``` -Don't forget to remove the `#` comment characters at the beginning of this -line. - `/etc/gitlab/gitlab.rb` should have file permissions `0600` because it contains plain-text passwords. -The next time a reconfigure is triggered, the migration steps will not be performed. +The next time hosts carrying the above configuration are reconfigured, the migration steps are not performed. + +To avoid schema related post-upgrade errors, the host marked as [the deploy node](https://docs.gitlab.com/ee/update/zero_downtime.html#multi-node--ha-deployment) must have `gitlab_rails['auto_migrate'] = true` during upgrades. ### Setting client statement_timeout