summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-28 11:16:48 +0000
committerLin Jen-Shin <godfat@godfat.org>2016-06-28 11:16:48 +0000
commit0a294698db01112c407575e690a8a368be6b15f8 (patch)
treeda9cecaebe37d2d982fb45c80d2eefd138d3d78c /db
parentfe0c59d2e61238e1241be448a37be0e3e702a5ce (diff)
downloadgitlab-ce-0a294698db01112c407575e690a8a368be6b15f8.tar.gz
Just save the size in total rather than individual files
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4964#note_12741046
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb (renamed from db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb)5
-rw-r--r--db/schema.rb3
2 files changed, 4 insertions, 4 deletions
diff --git a/db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb
index bad260b83ea..6e6e9dc3163 100644
--- a/db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb
+++ b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb
@@ -1,11 +1,10 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddArtifactsSizesToCiBuilds < ActiveRecord::Migration
+class AddArtifactsSizeToCiBuilds < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
def change
- # Or :json if under PostgreSQL?
- add_column(:ci_builds, :artifacts_sizes, :text)
+ add_column(:ci_builds, :artifacts_size, :integer)
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 7a8377f687c..509a2d30f4d 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: 20160620115026) do
+ActiveRecord::Schema.define(version: 20160628085157) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -163,6 +163,7 @@ ActiveRecord::Schema.define(version: 20160620115026) do
t.datetime "erased_at"
t.string "environment"
t.datetime "artifacts_expire_at"
+ t.integer "artifacts_size"
end
add_index "ci_builds", ["commit_id", "stage_idx", "created_at"], name: "index_ci_builds_on_commit_id_and_stage_idx_and_created_at", using: :btree