Flowdock
method

copy_table_indexes

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::FirebirdAdapter
copy_table_indexes(from, to) 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/connection_adapters/firebird_adapter.rb, line 656
        def copy_table_indexes(from, to)
          indexes(from).each do |index|
            unless index.name[from.to_s]
              raise ActiveRecordError,
                "Cannot rename index #{index.name}, because the index name does not include " <<
                "the original table name (#{from}). Try explicitly removing the index on the " <<
                "original table and re-adding it on the new (renamed) table."
            end
            options = {}
            options[:name] = index.name.gsub(from.to_s, to.to_s)
            options[:unique] = index.unique
            add_index(to, index.columns, options)
          end
        end
Register or log in to add new notes.