diff options
author | Stan Hu <stanhu@gmail.com> | 2017-08-08 04:47:48 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-08 04:47:48 +0300 |
commit | fd40bce9ccad94c3f8fe522a51a771335d95539f (patch) | |
tree | 0fb76c147480326f17fb77271628c24794255572 /db | |
parent | 4490af8cf22416f12c8cf2e00f8b7c293be08167 (diff) | |
parent | a0c22d1edafbd87d59dbf01acd610da97ec87912 (diff) |
Merge branch '31207-clean-locked-merge-requests' into 'master'
Resolve "Store MergeWorker JID on merge request, and clean up stuck merges"
Closes #31207
See merge request !13207
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb | 7 | ||||
-rw-r--r-- | db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 4 |
3 files changed, 20 insertions, 2 deletions
diff --git a/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb new file mode 100644 index 00000000000..a7d8f2f3604 --- /dev/null +++ b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb @@ -0,0 +1,7 @@ +class AddMergeJidToMergeRequests < ActiveRecord::Migration + DOWNTIME = false + + def change + add_column :merge_requests, :merge_jid, :string + end +end diff --git a/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb new file mode 100644 index 00000000000..ea3d1fb3e02 --- /dev/null +++ b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb @@ -0,0 +1,11 @@ +class RemoveLockedAtColumnFromMergeRequests < ActiveRecord::Migration + DOWNTIME = false + + def up + remove_column :merge_requests, :locked_at + end + + def down + add_column :merge_requests, :locked_at, :datetime_with_timezone + end +end diff --git a/db/schema.rb b/db/schema.rb index dc5640ad2ca..ed3cf70bcdd 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: 20170803130232) do +ActiveRecord::Schema.define(version: 20170807160457) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -850,7 +850,6 @@ ActiveRecord::Schema.define(version: 20170803130232) do t.integer "target_project_id", null: false t.integer "iid" t.text "description" - t.datetime "locked_at" t.integer "updated_by_id" t.text "merge_error" t.text "merge_params" @@ -868,6 +867,7 @@ ActiveRecord::Schema.define(version: 20170803130232) do t.integer "last_edited_by_id" t.integer "head_pipeline_id" t.boolean "ref_fetched" + t.string "merge_jid" end add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree |