method
new_column_definition
v5.1.7 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::TableDefinition
new_column_definition(name, type, **options)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 371
def new_column_definition(name, type, **options) # :nodoc:
type = aliased_types(type.to_s, type)
options[:primary_key] ||= type == :primary_key
options[:null] = false if options[:primary_key]
create_column_definition(name, type, options)
end