Fix indexes

This commit is contained in:
Ajay Ramachandran
2021-03-26 19:02:32 -04:00
parent c7eb5fed35
commit 46524e4298
3 changed files with 11 additions and 6 deletions

View File

@@ -24,7 +24,12 @@ export class Postgres implements IDatabase {
// Upgrade database if required
await this.upgradeDB(this.config.fileNamePrefix, this.config.dbSchemaFolder);
await this.applyIndexes(this.config.fileNamePrefix, this.config.dbSchemaFolder);
try {
await this.applyIndexes(this.config.fileNamePrefix, this.config.dbSchemaFolder);
} catch (e) {
Logger.warn("Applying indexes failed. See https://github.com/ajayyy/SponsorBlockServer/wiki/Postgres-Extensions for more information.");
Logger.warn(e);
}
}
}