mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-13 13:31:19 +00:00
21 lines
418 B
Ruby
21 lines
418 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Database
|
|
module AsyncConstraints
|
|
module Validators
|
|
MAPPING = {
|
|
foreign_key: Validators::ForeignKey,
|
|
check_constraint: Validators::CheckConstraint
|
|
}.freeze
|
|
|
|
def self.for(record)
|
|
MAPPING
|
|
.fetch(record.constraint_type.to_sym)
|
|
.new(record)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|