summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-28 18:14:21 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-28 18:14:21 +0800
commitfe0c59d2e61238e1241be448a37be0e3e702a5ce (patch)
treea002bc7887880f291b2294ebce044c3527dc7df4 /db
parentaa3a3fd12fc7152020ffbe54faa36a4f17eb94b2 (diff)
downloadgitlab-ce-fe0c59d2e61238e1241be448a37be0e3e702a5ce.tar.gz
Introduce ci_builds.artifacts_sizes as JSON:
We store the sizes as a hash from path to bytes like: ``` ruby {'ci_artifacts.txt' => 27, 'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' => 71759, 'other_artifacts_0.1.2/doc_sample.txt' => 1314, 'rails_sample.jpg' => 35255, 'tests_encoding/utf8 test dir ✓/regular_file_2' => 7} ``` So that it's easier to access than reading gzip file again.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb b/db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb
new file mode 100644
index 00000000000..bad260b83ea
--- /dev/null
+++ b/db/migrate/20160628085157_add_artifacts_sizes_to_ci_builds.rb
@@ -0,0 +1,11 @@
+# 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
+ include Gitlab::Database::MigrationHelpers
+
+ def change
+ # Or :json if under PostgreSQL?
+ add_column(:ci_builds, :artifacts_sizes, :text)
+ end
+end