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/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
|
@@ 910-918 (lines=9) @@
|
| 907 |
|
* @param mixed $default |
| 908 |
|
* @return string |
| 909 |
|
*/ |
| 910 |
|
protected function getDefaultValueDefinition($default) |
| 911 |
|
{ |
| 912 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 913 |
|
$default = $this->getConnection()->quote($default); |
| 914 |
|
} elseif (is_bool($default)) { |
| 915 |
|
$default = $this->castToBool($default); |
| 916 |
|
} |
| 917 |
|
|
| 918 |
|
return isset($default) ? 'DEFAULT ' . $default : ''; |
| 919 |
|
} |
| 920 |
|
|
| 921 |
|
/** |