method

new_column_definition

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::TableDefinition
new_column_definition(name, type, options) 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 366
      def new_column_definition(name, type, options) # :nodoc:
        type = aliased_types(type.to_s, type)
        column = create_column_definition name, type

        column.limit       = options[:limit]
        column.precision   = options[:precision]
        column.scale       = options[:scale]
        column.default     = options[:default]
        column.null        = options[:null]
        column.first       = options[:first]
        column.after       = options[:after]
        column.auto_increment = options[:auto_increment]
        column.primary_key = type == :primary_key || options[:primary_key]
        column.collation   = options[:collation]
        column.comment     = options[:comment]
        column
      end
Register or log in to add new notes.