Commit 6ec82daa authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '230465-fj-add-columns-to-track-group-wiki-storage' into 'master'

Add wiki_size and storage_size to NamespaceStatistics

See merge request gitlab-org/gitlab!54786
parents e1c57877 c2ac070d
---
title: Add wiki_size and storage_size to NamespaceStatistics
merge_request: 54786
author:
type: added
# frozen_string_literal: true
class AddStorageSizeToNamespaceStatistics < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_column :namespace_statistics, :storage_size, :bigint, default: 0, null: false
end
end
def down
with_lock_retries do
remove_column :namespace_statistics, :storage_size
end
end
end
# frozen_string_literal: true
class AddWikiSizeToNamespaceStatistics < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_column :namespace_statistics, :wiki_size, :bigint, default: 0, null: false
end
end
def down
with_lock_retries do
remove_column :namespace_statistics, :wiki_size
end
end
end
2aa618cdbb6e55c3af1fa144ae3f3bd0d9d5400706db337301d2d165ba789ef0
\ No newline at end of file
e13856c6f65d86dae9a3268f91189bb90af236c555d2f645c6ba4c600c996cba
\ No newline at end of file
......@@ -14375,7 +14375,9 @@ CREATE TABLE namespace_statistics (
id integer NOT NULL,
namespace_id integer NOT NULL,
shared_runners_seconds integer DEFAULT 0 NOT NULL,
shared_runners_seconds_last_reset timestamp without time zone
shared_runners_seconds_last_reset timestamp without time zone,
storage_size bigint DEFAULT 0 NOT NULL,
wiki_size bigint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE namespace_statistics_id_seq
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