X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/00375024263970a43ea7d39e3c65dfd0f32e8869..d24cba4345d1784780c6036837109380e37986ae:/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})"