mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
added schema support for mysql bigints
This commit is contained in:
parent
6a95b5746a
commit
15555a7309
1 changed files with 4 additions and 0 deletions
|
@ -108,6 +108,7 @@ class Mysql extends DboSource {
|
|||
'primary_key' => array('name' => 'NOT NULL AUTO_INCREMENT'),
|
||||
'string' => array('name' => 'varchar', 'limit' => '255'),
|
||||
'text' => array('name' => 'text'),
|
||||
'biginteger' => array('name' => 'bigint', 'limit' => '20'),
|
||||
'integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'),
|
||||
'float' => array('name' => 'float', 'formatter' => 'floatval'),
|
||||
'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') {
|
||||
return 'boolean';
|
||||
}
|
||||
if (strpos($col, 'bigint') !== false || $col === 'bigint') {
|
||||
return 'biginteger';
|
||||
}
|
||||
if (strpos($col, 'int') !== false) {
|
||||
return 'integer';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue