added schema support for mysql bigints

This commit is contained in:
Tommy MacWilliam 2012-08-26 01:32:17 -04:00 committed by mark_story
parent 6a95b5746a
commit 15555a7309

View file

@ -108,6 +108,7 @@ class Mysql extends DboSource {
'primary_key' => array('name' => 'NOT NULL AUTO_INCREMENT'), 'primary_key' => array('name' => 'NOT NULL AUTO_INCREMENT'),
'string' => array('name' => 'varchar', 'limit' => '255'), 'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'), 'text' => array('name' => 'text'),
'biginteger' => array('name' => 'bigint', 'limit' => '20'),
'integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'), 'integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'),
'float' => array('name' => 'float', 'formatter' => 'floatval'), 'float' => array('name' => 'float', 'formatter' => 'floatval'),
'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'), 'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
@ -646,6 +647,9 @@ class Mysql extends DboSource {
if (($col === 'tinyint' && $limit == 1) || $col === 'boolean') { if (($col === 'tinyint' && $limit == 1) || $col === 'boolean') {
return 'boolean'; return 'boolean';
} }
if (strpos($col, 'bigint') !== false || $col === 'bigint') {
return 'biginteger';
}
if (strpos($col, 'int') !== false) { if (strpos($col, 'int') !== false) {
return 'integer'; return 'integer';
} }