Commit 414cfbda authored by Jonne Haß's avatar Jonne Haß

Array#to_h is new in Ruby 2.1, we still suppport 2.0

parent c3bf9dd8
......@@ -37,12 +37,12 @@ class SetMysqlToUnicodeMb4 < ActiveRecord::Migration
def character_columns
# build a hash with all the columns that contain characters
@character_columns ||= {|table|
@character_columns ||= Hash[ {|table|
col = columns(table)
.select {|column| column.type == :string || column.type == :text }
next if col.empty?
[table, col]
def shorten_indexes
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment