Commit 955dfb36 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'sh-fix-namespace-stats-migration-failure' into 'master'

Fix namespace statistics migration failure

See merge request gitlab-org/gitlab!80344
parents 6d31d4a1 414ae564
...@@ -29,6 +29,10 @@ class NamespaceStatistics < ApplicationRecord # rubocop:disable Gitlab/Namespace ...@@ -29,6 +29,10 @@ class NamespaceStatistics < ApplicationRecord # rubocop:disable Gitlab/Namespace
end end
def update_storage_size 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 self.storage_size = dependency_proxy_size
end end
......
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