Commit 48cbc5b3 authored by Shane Archer's avatar Shane Archer Committed by Marco Pivetta

Made the checks consistent using in_array.

parent 68e9c5f3
......@@ -2241,7 +2241,7 @@ abstract class AbstractPlatform
if (isset($field['type'])) {
if (in_array((string)$field['type'], array("Integer", "BigInteger", "SmallInteger"))) {
$default = " DEFAULT ".$field['default'];
} elseif (((string)$field['type'] == 'DateTime' || (string)$field['type'] == 'DateTimeTz') && $field['default'] == $this->getCurrentTimestampSQL()) {
} elseif (in_array((string)$field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) {
$default = " DEFAULT ".$this->getCurrentTimestampSQL();
} elseif ((string)$field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) {
$default = " DEFAULT ".$this->getCurrentTimeSQL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment