diff options
Diffstat (limited to 'app/models/namespace_statistics.rb')
-rw-r--r-- | app/models/namespace_statistics.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/namespace_statistics.rb b/app/models/namespace_statistics.rb index 9a6244dbde8..04ca05d85ff 100644 --- a/app/models/namespace_statistics.rb +++ b/app/models/namespace_statistics.rb @@ -29,6 +29,10 @@ class NamespaceStatistics < ApplicationRecord # rubocop:disable Gitlab/Namespace end def update_storage_size + # This prevents failures with older database schemas, such as those + # in migration specs. + return unless self.class.database.cached_column_exists?(:dependency_proxy_size) + self.storage_size = dependency_proxy_size end |