mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix error when default value is reported as CURRENT_TIMESTAMP() with parenthesis
This commit is contained in:
parent
8cd930d19e
commit
4ec195f9c8
1 changed files with 2 additions and 1 deletions
|
@ -352,7 +352,8 @@ 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