- passato mongoose da versione 7 a versione 8
This commit is contained in:
@@ -134,7 +134,6 @@ const AttivitaSchema = new Schema(
|
||||
...tools.getFieldsForAnnunci()
|
||||
}, { strict: false });
|
||||
|
||||
AttivitaSchema.index({ 'idapp': 1 });
|
||||
|
||||
|
||||
AttivitaSchema.pre('save', async function (next) {
|
||||
|
||||
@@ -373,9 +373,4 @@ MySkillSchema.statics.getCompleteRecord = function (idapp, id) {
|
||||
|
||||
const MySkill = mongoose.model('MySkill', MySkillSchema);
|
||||
|
||||
MySkill.createIndexes()
|
||||
.then(() => { })
|
||||
.catch((err) => { throw err; });
|
||||
|
||||
|
||||
module.exports = { MySkill };
|
||||
|
||||
@@ -116,10 +116,10 @@ const sendNotifSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
sendNotifSchema.index({ idapp: 1 });
|
||||
/*sendNotifSchema.index({ idapp: 1 });
|
||||
sendNotifSchema.index({ typedir: 1 });
|
||||
sendNotifSchema.index({ typeid: 1 });
|
||||
sendNotifSchema.index({ sender: 1 });
|
||||
sendNotifSchema.index({ sender: 1 });*/
|
||||
|
||||
sendNotifSchema.index({ idapp: 1, typedir: 1, typeid: 1, status: 1, sender: 1 });
|
||||
|
||||
@@ -1383,9 +1383,4 @@ sendNotifSchema.statics.checkIfAlreadyExist = async function (idapp, tag, idpost
|
||||
|
||||
const SendNotif = mongoose.model('SendNotif', sendNotifSchema);
|
||||
|
||||
SendNotif.createIndexes()
|
||||
.then(() => { })
|
||||
.catch((err) => { throw err; });
|
||||
|
||||
|
||||
module.exports = { SendNotif: SendNotif };
|
||||
|
||||
@@ -6304,10 +6304,6 @@ UserSchema.statics.createNewSubRecord = async function (idapp, req) {
|
||||
|
||||
const User = mongoose.model('User', UserSchema);
|
||||
|
||||
User.createIndexes()
|
||||
.then(() => { })
|
||||
.catch((err) => { throw err; });
|
||||
|
||||
|
||||
class Hero {
|
||||
constructor(name, level) {
|
||||
|
||||
Reference in New Issue
Block a user