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:
authorSean McGivern <sean@gitlab.com>2018-11-27 15:57:51 +0300
committerSean McGivern <sean@gitlab.com>2018-11-27 15:57:51 +0300
commit913740de00c6a768c145608fd821911ceb370326 (patch)
tree9bf45143506f4ead4dc161ed423c3feae97701af /db
parent92bfb3c5be8ce9b034421040cadc23fe067e5c4b (diff)
parentfe2e6c6dc046748f8760bfbb3c74185bdbf1359b (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.rb22
-rw-r--r--db/schema.rb4
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"