method

legacy_index_name

Importance_0
v8.0.0 - Show latest stable - 0 notes - Class: LegacyIndexName
legacy_index_name(table_name, options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/migration/compatibility.rb, line 43
            def legacy_index_name(table_name, options)
              if Hash === options
                if options[:column]
                  "index_#{table_name}_on_#{Array(options[:column]) * '_and_'}"
                elsif options[:name]
                  options[:name]
                else
                  raise ArgumentError, "You must specify the index name"
                end
              else
                legacy_index_name(table_name, index_name_options(options))
              end
            end
Register or log in to add new notes.