X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/78f608b114c05f1147936a57b930831e28000c1a..503446c0fbbd9663f35198823f147e3b108aed37:/lib/migrate.rb diff --git a/lib/migrate.rb b/lib/migrate.rb index baa7faecd..7c14333b3 100644 --- a/lib/migrate.rb +++ b/lib/migrate.rb @@ -126,6 +126,9 @@ module ActiveRecord if Hash === options and options[:lowercase] quoted_column_names = quoted_column_names.map { |e| "LOWER(#{e})" } end + if Hash === options and options[:columns] + quoted_column_names = quoted_column_names + Array[options[:columns]] + end quoted_column_names = quoted_column_names.join(", ") execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)} USING #{index_method} (#{quoted_column_names})"