class ActiveRecord::ConnectionAdapters::Redshift::TableDefinition

Public Instance Methods

primary_key(name, type=:primary_key, **options) click to toggle source
Calls superclass method
# File lib/active_record/connection_adapters/redshift/schema_definitions.rb, line 33
def primary_key(name, type=:primary_key, **options)
  ints = %i(integer bigint)
  options[:auto_increment] ||= true if ints.include?(type) && !options.key?(:default)
  type = :primary_key if ints.include?(type) && options.delete(:auto_increment) == true
  super
end

Private Instance Methods

create_column_definition(name, type, options=nil) click to toggle source
# File lib/active_record/connection_adapters/redshift/schema_definitions.rb, line 27
def create_column_definition(name, type, options=nil)
  ColumnDefinition.new name, type, options
end