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:
authorGrzegorz Bizon <grzegorz@gitlab.com>2016-02-19 20:04:07 +0300
committerRémy Coutable <remy@rymai.me>2016-02-19 20:22:49 +0300
commit62067b74c826ed3ac527b8e139e5d4f8976cd710 (patch)
tree567ae70f077587d847135b884b9d198a06f0583c /db
parent64f1bab66ebbf4c7c09c3499b1c31179df273516 (diff)
Merge branch 'ci/remove-builds' into 'master'
Make it possible to erase build content (artifacts, trace) This feature makes it possible to remove build content - build artifacts and build traces. - [x] Remove artifacts - [x] Remove metadata - [x] Remove build traces - [x] Wait for https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1942 this to be merged - [x] Fix the permissions after the merge Closes #3421 See merge request !2560
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160202091601_add_erasable_to_ci_build.rb6
-rw-r--r--db/schema.rb3
2 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20160202091601_add_erasable_to_ci_build.rb b/db/migrate/20160202091601_add_erasable_to_ci_build.rb
new file mode 100644
index 00000000000..f9912f2274e
--- /dev/null
+++ b/db/migrate/20160202091601_add_erasable_to_ci_build.rb
@@ -0,0 +1,6 @@
+class AddErasableToCiBuild < ActiveRecord::Migration
+ def change
+ add_reference :ci_builds, :erased_by, references: :users, index: true
+ add_column :ci_builds, :erased_at, :datetime
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 689a8c3ecc5..2d1c6dbf0e4 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -129,6 +129,8 @@ ActiveRecord::Schema.define(version: 20160209130428) do
t.text "artifacts_file"
t.integer "gl_project_id"
t.text "artifacts_metadata"
+ t.integer "erased_by_id"
+ t.datetime "erased_at"
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
@@ -136,6 +138,7 @@ ActiveRecord::Schema.define(version: 20160209130428) do
add_index "ci_builds", ["commit_id", "type", "name", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_name_and_ref", using: :btree
add_index "ci_builds", ["commit_id", "type", "ref"], name: "index_ci_builds_on_commit_id_and_type_and_ref", using: :btree
add_index "ci_builds", ["commit_id"], name: "index_ci_builds_on_commit_id", using: :btree
+ add_index "ci_builds", ["erased_by_id"], name: "index_ci_builds_on_erased_by_id", using: :btree
add_index "ci_builds", ["gl_project_id"], name: "index_ci_builds_on_gl_project_id", using: :btree
add_index "ci_builds", ["project_id", "commit_id"], name: "index_ci_builds_on_project_id_and_commit_id", using: :btree
add_index "ci_builds", ["project_id"], name: "index_ci_builds_on_project_id", using: :btree