diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-04-18 18:15:40 +0700 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-05-06 15:12:41 +0700 |
commit | 827fc3ccb9335aa29fba0fc532b70015ec4c5186 (patch) | |
tree | 5ac47dfb716d56e4b8d6bf7cfbadf7ba01845fdd /db/schema.rb | |
parent | 9aa81c0a95b0e54bbafca4755e95f27ee1eeb759 (diff) | |
download | gitlab-ce-827fc3ccb9335aa29fba0fc532b70015ec4c5186.tar.gz |
Create ActiveRecordModel and table for Merge Train feature
This database table and AR model is going to be used for
the merge train feature.
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/schema.rb b/db/schema.rb index de9e6f0b40d..ef8cb4abf31 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1361,6 +1361,17 @@ ActiveRecord::Schema.define(version: 20190426180107) do t.index ["merge_request_id"], name: "index_merge_requests_closing_issues_on_merge_request_id", using: :btree end + create_table "merge_trains", force: :cascade do |t| + t.integer "merge_request_id", null: false + t.integer "user_id", null: false + t.integer "pipeline_id" + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.index ["merge_request_id"], name: "index_merge_trains_on_merge_request_id", unique: true, using: :btree + t.index ["pipeline_id"], name: "index_merge_trains_on_pipeline_id", using: :btree + t.index ["user_id"], name: "index_merge_trains_on_user_id", using: :btree + end + create_table "milestones", id: :serial, force: :cascade do |t| t.string "title", null: false t.integer "project_id" @@ -2514,6 +2525,9 @@ ActiveRecord::Schema.define(version: 20190426180107) do add_foreign_key "merge_requests", "users", column: "updated_by_id", name: "fk_641731faff", on_delete: :nullify add_foreign_key "merge_requests_closing_issues", "issues", on_delete: :cascade add_foreign_key "merge_requests_closing_issues", "merge_requests", on_delete: :cascade + add_foreign_key "merge_trains", "ci_pipelines", column: "pipeline_id", on_delete: :nullify + add_foreign_key "merge_trains", "merge_requests", on_delete: :cascade + add_foreign_key "merge_trains", "users", on_delete: :cascade add_foreign_key "milestones", "namespaces", column: "group_id", name: "fk_95650a40d4", on_delete: :cascade add_foreign_key "milestones", "projects", name: "fk_9bd0a0c791", on_delete: :cascade add_foreign_key "note_diff_files", "notes", column: "diff_note_id", on_delete: :cascade |