method

add_to

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: ReferenceDefinition
add_to(table) public

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/abstract/schema_definitions.rb, line 230
      def add_to(table)
        columns.each do |name, type, options|
          table.column(name, type, **options)
        end

        if index
          table.index(column_names, **index_options(table.name))
        end

        if foreign_key
          table.foreign_key(foreign_table_name, **foreign_key_options)
        end
      end
Register or log in to add new notes.