Commit bc43588c authored by Shinya Maeda's avatar Shinya Maeda

Chnage raw_data type to binary from text

parent 7c90fd77
......@@ -8,7 +8,7 @@ class CreateCiJobTraceChunks < ActiveRecord::Migration
t.integer :job_id, null: false
t.integer :chunk_index, null: false
t.integer :data_store, null: false
t.text :raw_data
t.binary :raw_data
t.foreign_key :ci_builds, column: :job_id, on_delete: :cascade
t.index [:job_id, :chunk_index], unique: true
......
......@@ -4,6 +4,6 @@ class LimitsCiJobTraceChunksRawDataForMysql < ActiveRecord::Migration
# Mysql needs MEDIUMTEXT type (up to 16MB) rather than TEXT (up to 64KB)
# Because 'raw_data' is always capped by Ci::JobTraceChunk::CHUNK_SIZE, which is 128KB
change_column :ci_job_trace_chunks, :raw_data, :text, limit: 16.megabytes - 1 #MEDIUMTEXT
change_column :ci_job_trace_chunks, :raw_data, :binary, limit: 16.megabytes - 1 #MEDIUMTEXT
end
end
......@@ -375,7 +375,7 @@ ActiveRecord::Schema.define(version: 20180418053107) do
t.integer "job_id", null: false
t.integer "chunk_index", null: false
t.integer "data_store", null: false
t.text "raw_data"
t.binary "raw_data"
end
add_index "ci_job_trace_chunks", ["job_id", "chunk_index"], name: "index_ci_job_trace_chunks_on_job_id_and_chunk_index", unique: true, using: :btree
......
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