Commit f86580c0 authored by Alexis Reigel's avatar Alexis Reigel

no more more :length due to mysql set_index hack

parent ce4e0837
# rubocop:disable all
require Rails.root.join('lib/gitlab/database/migration_helpers.rb')
class LimitsToMysql < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
def up
return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/
......@@ -12,14 +8,5 @@ class LimitsToMysql < ActiveRecord::Migration
change_column :snippets, :content, :text, limit: 2147483647
change_column :notes, :st_diff, :text, limit: 2147483647
change_column :events, :data, :text, limit: 2147483647
[
[:gpg_keys, :primary_keyid],
[:gpg_signatures, :commit_sha],
[:gpg_signatures, :gpg_key_primary_keyid]
].each do |table_name, column_name|
remove_index table_name, column_name if index_exists?(table_name, column_name)
add_concurrent_index table_name, column_name, length: 20
end
end
end
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