Skip to content

Commit

Permalink
Explicitly add column name to SQLite query (#43832)
Browse files Browse the repository at this point in the history
Fix for ErrorException: Undefined array key "size" while running artisan db:show on a SQLite database
  • Loading branch information
cjfloss authored Aug 24, 2022
1 parent 455d160 commit e201bbf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function getPostgresTableSize(ConnectionInterface $connection, string
*/
protected function getSqliteTableSize(ConnectionInterface $connection, string $table)
{
$result = $connection->selectOne('SELECT SUM(pgsize) FROM dbstat WHERE name=?', [
$result = $connection->selectOne('SELECT SUM(pgsize) AS size FROM dbstat WHERE name=?', [
$table,
]);

Expand Down

0 comments on commit e201bbf

Please sign in to comment.