method
add_column_options!
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::SchemaCreation
add_column_options!(sql, options)private
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 22
def add_column_options!(sql, options)
if options[:array] || options[:column].try(:array)
sql << '[]'
end
column = options.fetch(:column) { return super }
if column.type == :uuid && options[:default] =~ /\(\)/
sql << " DEFAULT #{options[:default]}"
else
super
end
end