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/MysqlAdapter.php 1 location
|
@@ 378-386 (lines=9) @@
|
| 375 |
|
* @param mixed $default |
| 376 |
|
* @return string |
| 377 |
|
*/ |
| 378 |
|
protected function getDefaultValueDefinition($default) |
| 379 |
|
{ |
| 380 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 381 |
|
$default = $this->getConnection()->quote($default); |
| 382 |
|
} elseif (is_bool($default)) { |
| 383 |
|
$default = $this->castToBool($default); |
| 384 |
|
} |
| 385 |
|
|
| 386 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 387 |
|
} |
| 388 |
|
|
| 389 |
|
/** |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 886-894 (lines=9) @@
|
| 883 |
|
* @param mixed $default |
| 884 |
|
* @return string |
| 885 |
|
*/ |
| 886 |
|
protected function getDefaultValueDefinition($default) |
| 887 |
|
{ |
| 888 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 889 |
|
$default = $this->getConnection()->quote($default); |
| 890 |
|
} elseif (is_bool($default)) { |
| 891 |
|
$default = $this->castToBool($default); |
| 892 |
|
} |
| 893 |
|
|
| 894 |
|
return isset($default) ? 'DEFAULT ' . $default : ''; |
| 895 |
|
} |
| 896 |
|
|
| 897 |
|
/** |
src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location
|
@@ 976-984 (lines=9) @@
|
| 973 |
|
* @param mixed $default |
| 974 |
|
* @return string |
| 975 |
|
*/ |
| 976 |
|
protected function getDefaultValueDefinition($default) |
| 977 |
|
{ |
| 978 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 979 |
|
$default = $this->getConnection()->quote($default); |
| 980 |
|
} elseif (is_bool($default)) { |
| 981 |
|
$default = $this->castToBool($default); |
| 982 |
|
} |
| 983 |
|
|
| 984 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 985 |
|
} |
| 986 |
|
|
| 987 |
|
/** |