]> git.openstreetmap.org Git - rails.git/blobdiff - lib/migrate.rb
Localisation updates from https://translatewiki.net.
[rails.git] / lib / migrate.rb
index baa7faecde3703d438548bb6c210ad812434d682..7c14333b30af91f0ad23b6f690d65d5852d11abb 100644 (file)
@@ -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})"