Skip to content

Commit

Permalink
debug: fix for mariadb method
Browse files Browse the repository at this point in the history
  • Loading branch information
WatheqAlshowaiter committed Jul 19, 2024
1 parent affd6b2 commit dac6dcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RequiredFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@ private static function getRequiredFieldsForMysqlAndMariaDb(
return (array) $column;
}, $queryResult);

if(!$withNullables){
if($withNullables){
dump($queryResult); // todo remove it later
}

return collect($queryResult)
->reject(function ($column) use ($withNullables, $withDefaults, $withPrimaryKey) {
return $column['primary'] && !$withPrimaryKey
|| $column['default'] != null && !$withDefaults
|| $column['nullable'] == 1 && !$withNullables;
|| $column['nullable'] && !$withNullables;
})
->pluck('name')
->toArray();
Expand Down

0 comments on commit dac6dcb

Please sign in to comment.