Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v5.1.7) is shown here.
prepare_column_options(column)
public
This can be overridden on an Adapter level basis to support other extended
datatypes (Example: Adding an array option in the PostgreSQL::ColumnDumper)
# File activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb, line 24
def prepare_column_options(column)
spec = {}
if limit = schema_limit(column)
spec[:limit] = limit
end
if precision = schema_precision(column)
spec[:precision] = precision
end
if scale = schema_scale(column)
spec[:scale] = scale
end
default = schema_default(column) if column.has_default?
spec[:default] = default unless default.nil?
spec[:null] = "false" unless column.null
if collation = schema_collation(column)
spec[:collation] = collation
end
spec[:comment] = column.comment.inspect if column.comment.present?
spec
end