Skip to content

Commit 695068c

Browse files
authored
Make check for CURRENT_TIMESTAMP in default value case insensitive (cakephp#2190)
1 parent ba63e43 commit 695068c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Phinx/Db/Adapter/PdoAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ protected function getDefaultValueDefinition($default, ?string $columnType = nul
601601
{
602602
if ($default instanceof Literal) {
603603
$default = (string)$default;
604-
} elseif (is_string($default) && strpos($default, 'CURRENT_TIMESTAMP') !== 0) {
604+
} elseif (is_string($default) && stripos($default, 'CURRENT_TIMESTAMP') !== 0) {
605605
// Ensure a defaults of CURRENT_TIMESTAMP(3) is not quoted.
606606
$default = $this->getConnection()->quote($default);
607607
} elseif (is_bool($default)) {

0 commit comments

Comments
 (0)