mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'issue-10830' into 2.x
Fix current_timestamp() handling in MariaDB
This commit is contained in:
commit
1d1a762a37
1 changed files with 3 additions and 1 deletions
|
@ -352,7 +352,9 @@ class Mysql extends DboSource {
|
|||
if (in_array($fields[$column->Field]['type'], $this->fieldParameters['unsigned']['types'], true)) {
|
||||
$fields[$column->Field]['unsigned'] = $this->_unsigned($column->Type);
|
||||
}
|
||||
if (in_array($fields[$column->Field]['type'], array('timestamp', 'datetime')) && strtoupper($column->Default) === 'CURRENT_TIMESTAMP') {
|
||||
if (in_array($fields[$column->Field]['type'], array('timestamp', 'datetime')) &&
|
||||
in_array(strtoupper($column->Default), array('CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP()'))
|
||||
) {
|
||||
$fields[$column->Field]['default'] = null;
|
||||
}
|
||||
if (!empty($column->Key) && isset($this->index[$column->Key])) {
|
||||
|
|
Loading…
Reference in a new issue