Parent

Files

Class/Module Index [+]

Quicksearch

ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition

Public Instance Methods

column(name, type = nil, options = {}) click to toggle source
# File lib/arjdbc/postgresql/adapter.rb, line 1407
def column(name, type = nil, options = {})
  super
  column = self[name]
  # NOTE: <= 3.1 no #new_column_definition hard-coded ColumnDef.new :
  # column = self[name] || ColumnDefinition.new(@base, name, type)
  # thus we simply do not support array column definitions on <= 3.1
  column.array = options[:array] if column.is_a?(ColumnDefinition)
  self
end
primary_key(name, type = :primary_key, options = {}) click to toggle source
# File lib/arjdbc/postgresql/adapter.rb, line 1400
def primary_key(name, type = :primary_key, options = {})
  return super unless type == :uuid
  options[:default] = options.fetch(:default, 'uuid_generate_v4()')
  options[:primary_key] = true
  column name, type, options
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.