diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 15:14:52 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 15:14:52 +0900 |
commit | eaf29ccec0b8075d87f8444839c383d8ef66dfd7 (patch) | |
tree | b2f2ef693af37b9721cc3df037f23b51797d8860 | |
parent | 4c6cb3cf0665ff8fe558451907b948a57f07d390 (diff) | |
download | gitlab-ce-eaf29ccec0b8075d87f8444839c383d8ef66dfd7.tar.gz |
Use MEDIUMTEXT(16MB) type when Mysql is used
-rw-r--r-- | db/migrate/20180326202229_create_ci_job_trace_chunks.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |