Merge pull request #5490 from RichieB2B/ncsc-nl/schema-status

Mark NULL vs "" as not critical
pull/5617/head
Andras Iklody 2020-01-10 17:26:21 +01:00 committed by GitHub
commit 4a76acfb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4594,7 +4594,7 @@ class Server extends AppModel
if ($colElementDiff == 'column_default') {
$expectedValue = $column['column_default'];
$actualValue = $keyedActualColumn[$columnName]['column_default'];
if (preg_match(sprintf('/(\'|")+%s(\1)+/', $expectedValue), $actualValue)) { // some version of mysql quote the default value
if (preg_match(sprintf('@(\'|")+%s(\1)+@', $expectedValue), $actualValue) || (empty($expectedValue) && $actualValue === 'NULL')) { // some version of mysql quote the default value
continue;
} else {
$isCritical = true;