mirror of https://gitgud.io/fatchan/jschan.git
parent
57bb23ae55
commit
523fbac0d7
5 changed files with 15 additions and 3 deletions
@ -0,0 +1,11 @@ |
||||
'use strict'; |
||||
|
||||
module.exports = async(db, redis) => { |
||||
console.log('fixing index for custompages'); |
||||
try { |
||||
await db.collection('custompages').dropIndex('board_1_url_1'); |
||||
} catch (e) { |
||||
// didnt have the bad index
|
||||
} |
||||
await db.collection('custompages').createIndex({ 'board': 1, 'page': 1 }, { unique: true }); |
||||
}; |
Loading…
Reference in new issue