diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /db/post_migrate/20180826111825_recalculate_site_statistics.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'db/post_migrate/20180826111825_recalculate_site_statistics.rb')
-rw-r--r-- | db/post_migrate/20180826111825_recalculate_site_statistics.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/db/post_migrate/20180826111825_recalculate_site_statistics.rb b/db/post_migrate/20180826111825_recalculate_site_statistics.rb deleted file mode 100644 index 938707c9ba4..00000000000 --- a/db/post_migrate/20180826111825_recalculate_site_statistics.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class RecalculateSiteStatistics < ActiveRecord::Migration[4.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - transaction do - execute('SET LOCAL statement_timeout TO 0') # see https://gitlab.com/gitlab-org/gitlab-foss/issues/48967 - - execute("UPDATE site_statistics SET repositories_count = (SELECT COUNT(*) FROM projects)") - end - - transaction do - execute('SET LOCAL statement_timeout TO 0') # see https://gitlab.com/gitlab-org/gitlab-foss/issues/48967 - - execute("UPDATE site_statistics SET wikis_count = (SELECT COUNT(*) FROM project_features WHERE wiki_access_level != 0)") - end - end - - def down - # No downside in keeping the counter up-to-date - end -end |