mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-04 03:11:24 +01:00
Fix #5284 for older sqlite3 configurations
This commit is contained in:
1 parent
c7437ddf8f
commit
0dbf268f37
1 file changed
+4
-1
@@ -7,6 +7,9 @@ const mysqlEngine = 'mysql2';
|
||||
const postgresEngine = 'pg';
|
||||
const sqliteClientName = 'better-sqlite3';
|
||||
|
||||
// Not used for new setups anymore but may exist in legacy setups
|
||||
const legacySqliteClientName = 'sqlite3';
|
||||
|
||||
let instance = null;
|
||||
|
||||
// 1. Load from config file first (not recommended anymore)
|
||||
@@ -184,7 +187,7 @@ const configGet = (key) => {
|
||||
*/
|
||||
const isSqlite = () => {
|
||||
instance === null && configure();
|
||||
return instance.database.knex && instance.database.knex.client === sqliteClientName;
|
||||
return instance.database.knex && [sqliteClientName, legacySqliteClientName].includes(instance.database.knex.client);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user