diff options
Diffstat (limited to 'app/models/concerns/sha_attribute.rb')
-rw-r--r-- | app/models/concerns/sha_attribute.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/concerns/sha_attribute.rb b/app/models/concerns/sha_attribute.rb index ba7c6c0cd8b..e49f4d03bda 100644 --- a/app/models/concerns/sha_attribute.rb +++ b/app/models/concerns/sha_attribute.rb @@ -3,11 +3,14 @@ module ShaAttribute extend ActiveSupport::Concern + # Needed for the database method + include DatabaseReflection + class_methods do def sha_attribute(name) return if ENV['STATIC_VERIFICATION'] - validate_binary_column_exists!(name) if Rails.env.development? + validate_binary_column_exists!(name) if Rails.env.development? || Rails.env.test? attribute(name, Gitlab::Database::ShaAttribute.new) end |