Skip to content

Commit

Permalink
Fix null check in DatabaseSource::alterTable
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaskill committed Apr 30, 2020
1 parent 9c38aab commit c65cd6f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Charcoal/Source/DatabaseSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,7 @@ public function alterTable()
$alter = true;
}

if ((strtolower($col['Null']) === 'no') && !$field->allowNull()) {
$alter = true;
}

if ((strtolower($col['Null']) !== 'no') && $field->allowNull()) {
if ((strtolower($col['Null']) !== 'no') !== $field->allowNull()) {
$alter = true;
}

Expand Down

0 comments on commit c65cd6f

Please sign in to comment.