Commit a89d95a8 authored by Brett Walker's avatar Brett Walker

added parameter on sha_attribute to allow specifiying if the database exists

parent 31ba12b3
......@@ -2,9 +2,9 @@ module ShaAttribute
extend ActiveSupport::Concern
module ClassMethods
def sha_attribute(name)
def sha_attribute(name, database_available = true)
return if ENV['STATIC_VERIFICATION']
return unless table_exists?
return unless database_available && table_exists?
column = columns.find { |c| c.name == name.to_s }
......
......@@ -10,8 +10,8 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
ignore_column :repository_verification_checksum
ignore_column :wiki_verification_checksum
sha_attribute :repository_verification_checksum_sha
sha_attribute :wiki_verification_checksum_sha
sha_attribute :repository_verification_checksum_sha, ::Gitlab::Geo.geo_database_configured?
sha_attribute :wiki_verification_checksum_sha, ::Gitlab::Geo.geo_database_configured?
belongs_to :project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment