lib/declare_schema/model/column.rb
def normalize_schema_attributes(schema_attributes, db_adapter_name)
          case schema_attributes[:type]
          when :boolean
            schema_attributes.reverse_merge(limit: 1)
          when :integer
            schema_attributes.reverse_merge(limit: 8) if db_adapter_name.match?(/sqlite/i)
          when :float
            schema_attributes.except(:limit)
          when :text
            schema_attributes.except(:limit)          if db_adapter_name.match?(/sqlite/i)
          when :datetime
            schema_attributes.reverse_merge(precision: 0)
          when NilClass
            raise ArgumentError, ":type key not found; keys: #{schema_attributes.keys.inspect}"
          end || schema_attributes
        end
# Normalizes schema attributes for the given database adapter name.
# Note that the un-normalized attributes are still useful for generating migrations because those
# may be run with a different adapter.
# This method never mutates its argument.
Normalizes schema attributes for the given database adapter name.
Note that the un-normalized attributes are still useful for generating migrations because those
may be run with a different adapter.
This method never mutates its argument.
Normalizes schema attributes for the given database adapter name . Note that the un - normalized attributes are still useful for generating migrations because those may be run with a different adapter . This method never mutates its argument .
def normalize_schema_attributes(schema_attributes, db_adapter_name)
          case schema_attributes[:type]
          when :boolean
            schema_attributes.reverse_merge(limit: 1)
          when :integer
            schema_attributes.reverse_merge(limit: 8) if db_adapter_name.match?(/sqlite/i)
          when :float
            schema_attributes.except(:limit)
          when :text
            schema_attributes.except(:limit)          if db_adapter_name.match?(/sqlite/i)
          when :datetime
            schema_attributes.reverse_merge(precision: 0)
          when NilClass
            raise ArgumentError, ":type key not found; keys: #{schema_attributes.keys.inspect}"
          end || schema_attributes
        end
def normalize_schema_attributes ( schema_attributes , db_adapter_name ) case schema_attributes [ :type ] when :boolean schema_attributes . reverse_merge ( limit : 1 ) when :integer schema_attributes . reverse_merge ( limit : 8 ) if db_adapter_name . match? ( / sqlite /i ) when :float schema_attributes . except ( :limit ) when :text schema_attributes . except ( :limit ) if db_adapter_name . match? ( / sqlite /i ) when :datetime schema_attributes . reverse_merge ( precision : 0 ) when NilClass raise ArgumentError , ":type key not found; keys: #{schema_attributes.keys.inspect}" end || schema_attributes end
Normalizes schema attributes for the given database adapter name.
Normalizes schema attributes for the given database adapter name .
schema_attributes
db_adapter_name