From a1de0f8e25a8430a91880e817efe27551e774c69 Mon Sep 17 00:00:00 2001 From: suxumi Date: Wed, 29 Mar 2023 10:32:49 +0300 Subject: [PATCH] postgresql database size fix --- src/Support/DbConnectionInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Support/DbConnectionInfo.php b/src/Support/DbConnectionInfo.php index 53ca7e60..95fbef55 100644 --- a/src/Support/DbConnectionInfo.php +++ b/src/Support/DbConnectionInfo.php @@ -62,7 +62,7 @@ protected function getMySQLDatabaseSize(ConnectionInterface $connection): int protected function getPostgresDatabaseSize(ConnectionInterface $connection): int { - return $connection->selectOne('SELECT pg_size_pretty(pg_database_size(?)) AS size;', [ + return $connection->selectOne('SELECT pg_database_size(?) / 1024 / 1024 AS size;', [ $connection->getDatabaseName(), ])->size; }