lib/dm-migrations/adapters/dm-mysql-adapter.rb
# Return the unsigned integer column type
#
# @param [Range] range
#   the min/max allowed integers
#
# @return [String]
#
# @api private
Return the unsigned integer column type
Return the unsigned integer column type
def unsigned_integer_column_type(range)
          max = range.last
          if    max < 2**8  then 'TINYINT'
          elsif max < 2**16 then 'SMALLINT'
          elsif max < 2**24 then 'MEDIUMINT'
          elsif max < 2**32 then 'INT'
          elsif max < 2**64 then 'BIGINT'
          else
            raise ArgumentError, "min #{range.first} and max #{max} exceeds supported range"
          end
        end
def unsigned_integer_column_type ( range ) max = range . last if max < 2 ** 8 then 'TINYINT' elsif max < 2 ** 16 then 'SMALLINT' elsif max < 2 ** 24 then 'MEDIUMINT' elsif max < 2 ** 32 then 'INT' elsif max < 2 ** 64 then 'BIGINT' else raise ArgumentError , "min #{range.first} and max #{max} exceeds supported range" end end
Return the unsigned integer column type
Return the unsigned integer column type
None
String
range
<not_specific>
<not_specific>
range the min/max allowed integers
range the min / max allowed integers
api
None