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>2023-10-19 15:57:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 15:57:54 +0300
commit419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch)
tree1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /gems/activerecord-gitlab/spec/support/models.rb
parent1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff)
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'gems/activerecord-gitlab/spec/support/models.rb')
-rw-r--r--gems/activerecord-gitlab/spec/support/models.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/gems/activerecord-gitlab/spec/support/models.rb b/gems/activerecord-gitlab/spec/support/models.rb
index c0017656ea8..445dc8b2ac2 100644
--- a/gems/activerecord-gitlab/spec/support/models.rb
+++ b/gems/activerecord-gitlab/spec/support/models.rb
@@ -48,3 +48,14 @@ class Metadata < PartitionedRecord
belongs_to :job,
->(metadata) { where(partition_id: metadata.partition_id) }
end
+
+class LockingJob < PartitionedRecord
+ self.table_name = :locking_jobs
+ query_constraints :id, :partition_id
+
+ enum status: { created: 0, completed: 1 }
+
+ def locking_enabled?
+ will_save_change_to_status?
+ end
+end