summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-15 10:51:38 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-15 10:51:38 +0000
commitea7d062fa60e3e622288237fc66a815348bbcf36 (patch)
tree69957b37821b4593ed9e75c330a5c650150cd3c3 /db
parentbe3a9440af7cedcf60dc1bb64c63f1786dc565bc (diff)
parent30b36c92c386e93b432166fb6f9dd973882a6d82 (diff)
downloadgitlab-ce-ea7d062fa60e3e622288237fc66a815348bbcf36.tar.gz
Merge branch 'auto-gc' into 'master' revert-01160fc0
Run 'git gc' every 10 pushes Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14250 Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12620 Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/254 Associated gitlab-shell MR: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/44 See merge request !3206
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160314143402_projects_add_pushes_since_gc.rb5
-rw-r--r--db/schema.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20160314143402_projects_add_pushes_since_gc.rb b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb
new file mode 100644
index 00000000000..5d30a38bc99
--- /dev/null
+++ b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb
@@ -0,0 +1,5 @@
+class ProjectsAddPushesSinceGc < ActiveRecord::Migration
+ def change
+ add_column :projects, :pushes_since_gc, :integer, default: 0
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index fa406f70907..5027d2ba32f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160309140734) do
+ActiveRecord::Schema.define(version: 20160314143402) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -720,6 +720,7 @@ ActiveRecord::Schema.define(version: 20160309140734) do
t.boolean "pending_delete", default: false
t.boolean "public_builds", default: true, null: false
t.string "main_language"
+ t.integer "pushes_since_gc", default: 0
end
add_index "projects", ["builds_enabled", "shared_runners_enabled"], name: "index_projects_on_builds_enabled_and_shared_runners_enabled", using: :btree