mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 12:37:00 +03:00
Fix preprocessor not being used for initial schema
This commit is contained in:
@@ -15,6 +15,10 @@ export class Mysql implements IDatabase {
|
||||
if (!this.config.readOnly) {
|
||||
// Upgrade database if required
|
||||
this.upgradeDB(this.config.fileNamePrefix, this.config.dbSchemaFolder);
|
||||
|
||||
if (this.config.createDbIfNotExists && !this.config.readOnly && fs.existsSync(this.config.dbSchemaFileName)) {
|
||||
this.pool.query(this.processUpgradeQuery(fs.readFileSync(this.config.dbSchemaFileName).toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user