diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb | 5 | ||||
-rw-r--r-- | db/migrate/20160202091601_add_erasable_to_ci_build.rb | 6 | ||||
-rw-r--r-- | db/schema.rb | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb new file mode 100644 index 00000000000..f0d94226514 --- /dev/null +++ b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb @@ -0,0 +1,5 @@ +class AddMergeCommitShaToMergeRequests < ActiveRecord::Migration + def change + add_column :merge_requests, :merge_commit_sha, :string + end +end 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 0976058bd16..af5bac63b42 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -129,6 +129,8 @@ ActiveRecord::Schema.define(version: 20160217100506) 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: 20160217100506) 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 @@ -523,6 +526,7 @@ ActiveRecord::Schema.define(version: 20160217100506) do t.text "merge_params" t.boolean "merge_when_build_succeeds", default: false, null: false t.integer "merge_user_id" + t.string "merge_commit_sha" end add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree |