method

integer_to_sql

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: SchemaStatements
integer_to_sql(limit) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb, line 282
          def integer_to_sql(limit)
            case limit
            when 1; "tinyint"
            when 2; "smallint"
            when 3; "mediumint"
            when nil, 4; "int"
            when 5..8; "bigint"
            else raise ArgumentError, "No integer type has byte size #{limit}. Use a decimal with scale 0 instead."
            end
          end
Register or log in to add new notes.