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/PostgresAdapter.php 1 location
|
@@ 878-886 (lines=9) @@
|
| 875 |
|
* @param mixed $default |
| 876 |
|
* @return string |
| 877 |
|
*/ |
| 878 |
|
protected function getDefaultValueDefinition($default) |
| 879 |
|
{ |
| 880 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 881 |
|
$default = $this->getConnection()->quote($default); |
| 882 |
|
} elseif (is_bool($default)) { |
| 883 |
|
$default = $this->castToBool($default); |
| 884 |
|
} |
| 885 |
|
|
| 886 |
|
return isset($default) ? 'DEFAULT ' . $default : ''; |
| 887 |
|
} |
| 888 |
|
|
| 889 |
|
/** |
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 |
|
/** |