Add snippets_size to namespace_root_storage_statistics table

parent 1b0feb52
---
title: Add snippets_size to namespace_root_storage_statistics
merge_request: 35311
author:
type: changed
# frozen_string_literal: true
class AddSnippetsSizeToRootStorageStatistics < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_column :namespace_root_storage_statistics, :snippets_size, :bigint, default: 0, null: false
end
end
def down
with_lock_retries do
remove_column :namespace_root_storage_statistics, :snippets_size
end
end
end
......@@ -12975,7 +12975,8 @@ CREATE TABLE public.namespace_root_storage_statistics (
wiki_size bigint DEFAULT 0 NOT NULL,
build_artifacts_size bigint DEFAULT 0 NOT NULL,
storage_size bigint DEFAULT 0 NOT NULL,
packages_size bigint DEFAULT 0 NOT NULL
packages_size bigint DEFAULT 0 NOT NULL,
snippets_size bigint DEFAULT 0 NOT NULL
);
CREATE TABLE public.namespace_statistics (
......@@ -23456,6 +23457,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200624075411
20200624222443
20200625045442
20200625082258
20200625190458
20200626130220
\.
......
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