From eaf29ccec0b8075d87f8444839c383d8ef66dfd7 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Fri, 6 Apr 2018 15:14:52 +0900 Subject: Use MEDIUMTEXT(16MB) type when Mysql is used --- db/migrate/20180326202229_create_ci_job_trace_chunks.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/migrate/20180326202229_create_ci_job_trace_chunks.rb b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb index abfaea9f54a..e9f43eaf67f 100644 --- a/db/migrate/20180326202229_create_ci_job_trace_chunks.rb +++ b/db/migrate/20180326202229_create_ci_job_trace_chunks.rb @@ -8,7 +8,9 @@ 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 + # 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 + t.text :raw_data, limit: 16.megabytes - 1 t.foreign_key :ci_builds, column: :job_id, on_delete: :cascade t.index [:job_id, :chunk_index], unique: true -- cgit v1.2.1