Commit 84f4165d authored by leiminghuan's avatar leiminghuan

change datatype of merge_requests.squash_commit_sha to binary

parent c08c6e1c
......@@ -16,6 +16,9 @@ class MergeRequest < ApplicationRecord
include ReactiveCaching
include FromUnion
include DeprecatedAssignee
include ShaAttribute
sha_attribute :squash_commit_sha
self.reactive_cache_key = ->(model) { [model.project.id, model.iid] }
self.reactive_cache_refresh_interval = 10.minutes
......
......@@ -5,6 +5,6 @@ class AddSquashCommitShaToMergeRequests < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
add_column :merge_requests, :squash_commit_sha, :varchar
add_column :merge_requests, :squash_commit_sha, :binary
end
end
......@@ -2258,7 +2258,7 @@ ActiveRecord::Schema.define(version: 2019_10_16_072826) do
t.boolean "allow_maintainer_to_push"
t.integer "state_id", limit: 2
t.string "rebase_jid"
t.string "squash_commit_sha"
t.binary "squash_commit_sha"
t.index ["assignee_id"], name: "index_merge_requests_on_assignee_id"
t.index ["author_id"], name: "index_merge_requests_on_author_id"
t.index ["created_at"], name: "index_merge_requests_on_created_at"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment