diff --git a/keyserver/src/cron/cron.js b/keyserver/src/cron/cron.js --- a/keyserver/src/cron/cron.js +++ b/keyserver/src/cron/cron.js @@ -27,7 +27,7 @@ if (cluster.isMaster) { schedule.scheduleJob( - '30 3 * * *', // every day at 3:30 AM Pacific Time + '30 3 * * *', // every day at 3:30 AM GMT async () => { try { // Do everything one at a time to reduce load since we're in no hurry, diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js --- a/keyserver/src/database/migration-config.js +++ b/keyserver/src/database/migration-config.js @@ -216,6 +216,15 @@ `); }, ], + [ + 21, + async () => { + await dbQuery(SQL` + ALTER TABLE reports + ADD INDEX IF NOT EXISTS user (user); + `); + }, + ], ]); const newDatabaseVersion: number = Math.max(...migrations.keys()); diff --git a/keyserver/src/database/setup-db.js b/keyserver/src/database/setup-db.js --- a/keyserver/src/database/setup-db.js +++ b/keyserver/src/database/setup-db.js @@ -292,7 +292,8 @@ ALTER TABLE notifications ADD INDEX user (user); ALTER TABLE reports - ADD PRIMARY KEY (id); + ADD PRIMARY KEY (id), + ADD INDEX user (user); ALTER TABLE revisions ADD PRIMARY KEY (id),