Skip to content

Adds container_registry_size to project_statistics

Vijay Hawoldar requested to merge vij-container-reg-stats-1 into master

What does this MR do and why?

So that we can track and eventually display Container Registry storage size, this MR adds a new container_registry_size column to the ProjectStatistics table.

With this column we can eventually (in upcoming MRs) update the column when Container Registry pushes/deletes happen

Refs #354480 (closed)

Migration info

Migrate up:

> bin/rails db:migrate

== 20220404114106 AddContainerRegistrySizeToProjectStatistics: migrating ======
-- add_column(:project_statistics, :container_registry_size, :bigint, {:default=>0, :null=>false})
   -> 0.0111s
== 20220404114106 AddContainerRegistrySizeToProjectStatistics: migrated (0.0111s)

Migrate down:

> bin/rails db:rollback

== 20220404114106 AddContainerRegistrySizeToProjectStatistics: reverting ======
-- remove_column(:project_statistics, :container_registry_size, :bigint, {:default=>0, :null=>false})
   -> 0.0132s
== 20220404114106 AddContainerRegistrySizeToProjectStatistics: reverted (0.0166s)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vijay Hawoldar

Merge request reports

Loading