1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 08:19:52 +01:00

Fix integer values overflowing on signed INTEGER columns.

Doctrine does not hint or support unsigned schema columns, which means that by default columns will be signed in many DBMS - i.e. in MySQL this means that the max value for `INTEGER` column is 2147483647.
This commit is contained in:
Artur Bodera 2013-11-26 18:54:54 +01:00
parent 7df7fcc89f
commit 277edbc10a

View File

@ -27,7 +27,7 @@ class ColumnTypeGuesser
case 'smallint':
return function() { return mt_rand(0,65535); };
case 'integer':
return function() { return mt_rand(0,intval('4294967295')); };
return function() { return mt_rand(0,intval('2147483647')); };
case 'bigint':
return function() { return mt_rand(0,intval('18446744073709551615')); };
case 'float':