Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2019-05-02 19:04:15 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-05-02 19:04:15 +0300
commitd9b383cc3681c4ae6fe0dbef20a3d1089e48e139 (patch)
tree8c1a00a07faa120c6fbaacc389fa9266cdf306db /db
parent37606e666736c9686054ee5155e3d2d21eb1a0c9 (diff)
Add packages_size to ProjectStatistics
This new field will allow to keep track of the storage used by the packages features, it provides also aggregation at namespace level.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190415095825_add_packages_size_to_project_statistics.rb11
-rw-r--r--db/schema.rb1
2 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20190415095825_add_packages_size_to_project_statistics.rb b/db/migrate/20190415095825_add_packages_size_to_project_statistics.rb
new file mode 100644
index 00000000000..99625981563
--- /dev/null
+++ b/db/migrate/20190415095825_add_packages_size_to_project_statistics.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddPackagesSizeToProjectStatistics < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :project_statistics, :packages_size, :bigint
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2e77bbb51e5..11230d4e691 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1715,6 +1715,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do
t.bigint "repository_size", default: 0, null: false
t.bigint "lfs_objects_size", default: 0, null: false
t.bigint "build_artifacts_size", default: 0, null: false
+ t.bigint "packages_size"
t.index ["namespace_id"], name: "index_project_statistics_on_namespace_id", using: :btree
t.index ["project_id"], name: "index_project_statistics_on_project_id", unique: true, using: :btree
end