compat versions sqlite <3.3.0

This commit is contained in:
Jephté Clain 2024-10-15 12:21:55 +04:00
parent da011b56cb
commit 8117c8cf0a
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ class SqliteStorage extends CapacitorStorage {
function tableExists(string $tableName): bool {
$name = $this->db->get([
"select name from sqlite_schema",
# depuis la version 3.33.0 le nom officiel de la table est sqlite_schema,
# mais le nom sqlite_master est toujours valable pour le moment
"select name from sqlite_master ",
"where" => ["name" => $tableName],
]);
return $name !== null;