| @@ 2284-2286 (lines=3) @@ | ||
| 2281 | if (isset($field['type'])) { |
|
| 2282 | if (in_array((string) $field['type'], ["Integer", "BigInt", "SmallInt"])) { |
|
| 2283 | $default = " DEFAULT ".$field['default']; |
|
| 2284 | } elseif (in_array((string) $field['type'], ['DateTime', 'DateTimeTz']) && $field['default'] == $this->getCurrentTimestampSQL()) { |
|
| 2285 | $default = " DEFAULT ".$this->getCurrentTimestampSQL(); |
|
| 2286 | } elseif ((string) $field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) { |
|
| 2287 | $default = " DEFAULT ".$this->getCurrentTimeSQL(); |
|
| 2288 | } elseif ((string) $field['type'] == 'Date' && $field['default'] == $this->getCurrentDateSQL()) { |
|
| 2289 | $default = " DEFAULT ".$this->getCurrentDateSQL(); |
|
| @@ 1561-1563 (lines=3) @@ | ||
| 1558 | return " DEFAULT " . $field['default']; |
|
| 1559 | } |
|
| 1560 | ||
| 1561 | if (in_array((string) $field['type'], ['DateTime', 'DateTimeTz']) && $field['default'] == $this->getCurrentTimestampSQL()) { |
|
| 1562 | return " DEFAULT " . $this->getCurrentTimestampSQL(); |
|
| 1563 | } |
|
| 1564 | ||
| 1565 | if ((string) $field['type'] == 'Boolean') { |
|
| 1566 | return " DEFAULT '" . $this->convertBooleans($field['default']) . "'"; |
|