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>2020-03-12 15:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 15:09:17 +0300
commitcd52759ee33051b8ad7b88b02ba7954e4fad7018 (patch)
treef1096c68e457aef7f5201acd16e4a751ff538026 /db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb
parent18f7828977b74bf6e5153594a098ef90e773b3b7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb')
-rw-r--r--db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb b/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb
index c0c58cfa3a7..8e48490af77 100644
--- a/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb
+++ b/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb
@@ -9,9 +9,15 @@ class DefaultLockVersionToZeroForMergeRequests < ActiveRecord::Migration[6.0]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
- def change
+ def up
with_lock_retries do
change_column_default :merge_requests, :lock_version, from: nil, to: 0
end
end
+
+ def down
+ with_lock_retries do
+ change_column_default :merge_requests, :lock_version, from: 0, to: nil
+ end
+ end
end