123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::ColumnDefinition

Relationships & Source Files
Inherits: Struct
  • ::Object
Defined in: activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

Overview

Abstract representation of a column definition. Instances of this type are typically created by methods in TableDefinition, and added to the columns attribute of said TableDefinition object, in order to be used for generating a number of table creation or table changing SQL statements.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#primary_key?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 93

def primary_key?
  options[:primary_key]
end

Instance Method Details

#aliased_types(name, fallback)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 109

def aliased_types(name, fallback)
  "timestamp" == name ? :datetime : fallback
end