diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 21:02:11 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-04-06 21:02:11 +0900 |
commit | a79cbbd809e1de014ad76273a03f48382e9e298e (patch) | |
tree | 58d386e5cd895f8630e6ad45dba308b2d80e7e18 /db | |
parent | 8a9955cf5cca7ae09d3479d2386eb5a856d17601 (diff) | |
download | gitlab-ce-a79cbbd809e1de014ad76273a03f48382e9e298e.tar.gz |
Add rake task and timestamped migration file for mysql raw_data MIDIUMTEXT
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180406204716_add_limits_ci_job_trace_chunks_raw_data_for_mysql.rb | 13 | ||||
-rw-r--r-- | db/migrate/limits_ci_job_trace_chunks_raw_data_for_mysql.rb | 7 | ||||
-rw-r--r-- | db/schema.rb | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/db/migrate/20180406204716_add_limits_ci_job_trace_chunks_raw_data_for_mysql.rb b/db/migrate/20180406204716_add_limits_ci_job_trace_chunks_raw_data_for_mysql.rb new file mode 100644 index 00000000000..e7343db7da0 --- /dev/null +++ b/db/migrate/20180406204716_add_limits_ci_job_trace_chunks_raw_data_for_mysql.rb @@ -0,0 +1,13 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. +require Rails.root.join('db/migrate/limits_ci_job_trace_chunks_raw_data_for_mysql') + +class AddLimitsCiJobTraceChunksRawDataForMysql < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + LimitsCiJobTraceChunksRawDataForMysql.new.up + end +end diff --git a/db/migrate/limits_ci_job_trace_chunks_raw_data_for_mysql.rb b/db/migrate/limits_ci_job_trace_chunks_raw_data_for_mysql.rb new file mode 100644 index 00000000000..64088efa70b --- /dev/null +++ b/db/migrate/limits_ci_job_trace_chunks_raw_data_for_mysql.rb @@ -0,0 +1,7 @@ +class LimitsCiJobTraceChunksRawDataForMysql < ActiveRecord::Migration + def up + return unless Gitlab::Database.mysql? + + change_column :ci_job_trace_chunks, :raw_data, :text, limit: 16.megabytes - 1 #MEDIUMTEXT + end +end diff --git a/db/schema.rb b/db/schema.rb index 931941da81c..69d7997b4bf 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: 20180405101928) do +ActiveRecord::Schema.define(version: 20180406204716) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |