diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-24 12:10:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-24 12:10:45 +0300 |
commit | 38d4874ab934aa8ebc004b923cabcc981c0f3e7f (patch) | |
tree | f15372d4261d6207e585921dadfb8c05819ce2e8 /lib/gitlab/database.rb | |
parent | 505cb2114df4f12f0fd69a0e04fb8d498e5e216e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r-- | lib/gitlab/database.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index acad19e096c..022752a0650 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -147,9 +147,16 @@ module Gitlab # spec/support/database/prevent_cross_joins.rb end + # This method will allow cross database modifications within the block + # Example: + # + # allow_cross_database_modification_within_transaction(url: 'url-to-an-issue') do + # create(:build) # inserts ci_build and project record in one transaction + # end def self.allow_cross_database_modification_within_transaction(url:) - # this method is implemented in: + # this method will be overridden in: # spec/support/database/cross_database_modification_check.rb + yield end def self.add_post_migrate_path_to_rails(force: false) |