mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 13:07:02 +03:00
Check config.readonly instead of config.mode as condition to creading tables from schema files
This commit is contained in:
2
index.js
2
index.js
@@ -29,7 +29,7 @@ var db = new Sqlite3(config.db, options);
|
||||
//where the more sensitive data such as IP addresses are stored
|
||||
var privateDB = new Sqlite3(config.privateDB, options);
|
||||
|
||||
if (config.createDatabaseIfNotExist && (config.mode === "development")) {
|
||||
if (config.createDatabaseIfNotExist && !config.readOnly) {
|
||||
db.exec(fs.readFileSync(config.dbSchema).toString());
|
||||
privateDB.exec(fs.readFileSync(config.privateDBSchema).toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user