src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 383-391 (lines=9) @@
|
| 380 |
|
* @param mixed $default |
| 381 |
|
* @return string |
| 382 |
|
*/ |
| 383 |
|
protected function getDefaultValueDefinition($default) |
| 384 |
|
{ |
| 385 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 386 |
|
$default = $this->getConnection()->quote($default); |
| 387 |
|
} elseif (is_bool($default)) { |
| 388 |
|
$default = $this->castToBool($default); |
| 389 |
|
} |
| 390 |
|
|
| 391 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 392 |
|
} |
| 393 |
|
|
| 394 |
|
/** |
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location
|
@@ 1007-1015 (lines=9) @@
|
| 1004 |
|
* @param mixed $default |
| 1005 |
|
* @return string |
| 1006 |
|
*/ |
| 1007 |
|
protected function getDefaultValueDefinition($default) |
| 1008 |
|
{ |
| 1009 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 1010 |
|
$default = $this->getConnection()->quote($default); |
| 1011 |
|
} elseif (is_bool($default)) { |
| 1012 |
|
$default = $this->castToBool($default); |
| 1013 |
|
} |
| 1014 |
|
|
| 1015 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 1016 |
|
} |
| 1017 |
|
|
| 1018 |
|
/** |
src/Phinx/Db/Adapter/PostgresAdapter.php 1 location
|
@@ 890-898 (lines=9) @@
|
| 887 |
|
* @param mixed $default |
| 888 |
|
* @return string |
| 889 |
|
*/ |
| 890 |
|
protected function getDefaultValueDefinition($default) |
| 891 |
|
{ |
| 892 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 893 |
|
$default = $this->getConnection()->quote($default); |
| 894 |
|
} elseif (is_bool($default)) { |
| 895 |
|
$default = $this->castToBool($default); |
| 896 |
|
} |
| 897 |
|
|
| 898 |
|
return isset($default) ? 'DEFAULT ' . $default : ''; |
| 899 |
|
} |
| 900 |
|
|
| 901 |
|
/** |
src/Phinx/Db/Adapter/SQLiteAdapter.php 1 location
|
@@ 964-972 (lines=9) @@
|
| 961 |
|
* @param mixed $default |
| 962 |
|
* @return string |
| 963 |
|
*/ |
| 964 |
|
protected function getDefaultValueDefinition($default) |
| 965 |
|
{ |
| 966 |
|
if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) { |
| 967 |
|
$default = $this->getConnection()->quote($default); |
| 968 |
|
} elseif (is_bool($default)) { |
| 969 |
|
$default = $this->castToBool($default); |
| 970 |
|
} |
| 971 |
|
|
| 972 |
|
return isset($default) ? ' DEFAULT ' . $default : ''; |
| 973 |
|
} |
| 974 |
|
|
| 975 |
|
/** |