src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 373-381 (lines=9) @@
|
| 370 |
|
* @param mixed $default |
| 371 |
|
* @return string |
| 372 |
|
*/ |
| 373 |
|
protected function getDefaultValueDefinition($default) |
| 374 |
|
{ |
| 375 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 376 |
|
$default = $this->getConnection()->quote($default); |
| 377 |
|
} elseif (is_bool($default)) { |
| 378 |
|
$default = $this->castToBool($default); |
| 379 |
|
} |
| 380 |
|
|
| 381 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 382 |
|
} |
| 383 |
|
|
| 384 |
|
/** |
src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location
|
@@ 952-960 (lines=9) @@
|
| 949 |
|
* @param mixed $default |
| 950 |
|
* @return string |
| 951 |
|
*/ |
| 952 |
|
protected function getDefaultValueDefinition($default) |
| 953 |
|
{ |
| 954 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 955 |
|
$default = $this->getConnection()->quote($default); |
| 956 |
|
} elseif (is_bool($default)) { |
| 957 |
|
$default = $this->castToBool($default); |
| 958 |
|
} |
| 959 |
|
|
| 960 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
/** |
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location
|
@@ 997-1005 (lines=9) @@
|
| 994 |
|
* @param mixed $default |
| 995 |
|
* @return string |
| 996 |
|
*/ |
| 997 |
|
protected function getDefaultValueDefinition($default) |
| 998 |
|
{ |
| 999 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 1000 |
|
$default = $this->getConnection()->quote($default); |
| 1001 |
|
} elseif (is_bool($default)) { |
| 1002 |
|
$default = $this->castToBool($default); |
| 1003 |
|
} |
| 1004 |
|
|
| 1005 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 1006 |
|
} |
| 1007 |
|
|
| 1008 |
|
/** |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 902-910 (lines=9) @@
|
| 899 |
|
* @param mixed $default |
| 900 |
|
* @return string |
| 901 |
|
*/ |
| 902 |
|
protected function getDefaultValueDefinition($default) |
| 903 |
|
{ |
| 904 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 905 |
|
$default = $this->getConnection()->quote($default); |
| 906 |
|
} elseif (is_bool($default)) { |
| 907 |
|
$default = $this->castToBool($default); |
| 908 |
|
} |
| 909 |
|
|
| 910 |
|
return isset($default) ? 'DEFAULT ' . $default : ''; |
| 911 |
|
} |
| 912 |
|
|
| 913 |
|
/** |