Commit 1d92a8ee authored by Shane Archer's avatar Shane Archer Committed by Marco Pivetta

Allow current timestamp default to be specified for DateTimeTz type.

parent c1c33531
...@@ -2241,7 +2241,7 @@ abstract class AbstractPlatform ...@@ -2241,7 +2241,7 @@ abstract class AbstractPlatform
if (isset($field['type'])) { if (isset($field['type'])) {
if (in_array((string)$field['type'], array("Integer", "BigInteger", "SmallInteger"))) { if (in_array((string)$field['type'], array("Integer", "BigInteger", "SmallInteger"))) {
$default = " DEFAULT ".$field['default']; $default = " DEFAULT ".$field['default'];
} elseif ((string)$field['type'] == 'DateTime' && $field['default'] == $this->getCurrentTimestampSQL()) { } elseif (((string)$field['type'] == 'DateTime' || (string)$field['type'] == 'DateTimeTz') && $field['default'] == $this->getCurrentTimestampSQL()) {
$default = " DEFAULT ".$this->getCurrentTimestampSQL(); $default = " DEFAULT ".$this->getCurrentTimestampSQL();
} elseif ((string)$field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) { } elseif ((string)$field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) {
$default = " 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