Skip to content

Commit

Permalink
SqliteDriver: fixed incorrect results from PRAGMA foreign_key_list [C…
Browse files Browse the repository at this point in the history
…loses #281]
  • Loading branch information
dg committed Jan 19, 2022
1 parent 24d46ec commit 7cf5295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function getForeignKeys(string $table): array
$keys[$row['id']]['table'] = $row['table']; // referenced table
$keys[$row['id']]['foreign'] = $row['to']; // referenced columns

if ($keys[$row['id']]['foreign'][0] == null) {
if (empty($keys[$row['id']]['foreign'][0])) {
$keys[$row['id']]['foreign'] = null;
}
}
Expand Down

0 comments on commit 7cf5295

Please sign in to comment.