diff --git a/src/Model/Table/RequestsTable.php b/src/Model/Table/RequestsTable.php index c30c5a2d4..096f4c96f 100644 --- a/src/Model/Table/RequestsTable.php +++ b/src/Model/Table/RequestsTable.php @@ -13,6 +13,7 @@ namespace DebugKit\Model\Table; use Cake\Core\Configure; +use Cake\Database\Driver\Sqlite; use Cake\ORM\Query; use Cake\ORM\Table; use DebugKit\Model\Entity\Request; @@ -108,5 +109,10 @@ public function gc() $statement = $query->execute(); $statement->closeCursor(); + + $conn = $this->getConnection(); + if ($conn->getDriver() instanceof Sqlite) { + $conn->execute('VACUUM;'); + } } }