diff options
author | Sean McGivern <sean@gitlab.com> | 2018-11-27 15:57:51 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-11-27 15:57:51 +0300 |
commit | 913740de00c6a768c145608fd821911ceb370326 (patch) | |
tree | 9bf45143506f4ead4dc161ed423c3feae97701af /db | |
parent | 92bfb3c5be8ce9b034421040cadc23fe067e5c4b (diff) | |
parent | fe2e6c6dc046748f8760bfbb3c74185bdbf1359b (diff) |
Merge branch '53778-remove-site-statistics' into 'master'
Remove Site Statistic
Closes #53778
See merge request gitlab-org/gitlab-ce!23314
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20181123042307_drop_site_statistics.rb | 22 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 22 insertions, 4 deletions
diff --git a/db/migrate/20181123042307_drop_site_statistics.rb b/db/migrate/20181123042307_drop_site_statistics.rb new file mode 100644 index 00000000000..8986374ef65 --- /dev/null +++ b/db/migrate/20181123042307_drop_site_statistics.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DropSiteStatistics < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + drop_table :site_statistics + end + + def down + create_table :site_statistics do |t| + t.integer :repositories_count, default: 0, null: false + end + + execute('INSERT INTO site_statistics (id) VALUES(1)') + end +end diff --git a/db/schema.rb b/db/schema.rb index e0ca571df5a..9c9c19aa897 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1885,10 +1885,6 @@ ActiveRecord::Schema.define(version: 20181126153547) do t.index ["name"], name: "index_shards_on_name", unique: true, using: :btree end - create_table "site_statistics", force: :cascade do |t| - t.integer "repositories_count", default: 0, null: false - end - create_table "snippets", force: :cascade do |t| t.string "title" t.text "content" |