aggiornamento Indici
This commit is contained in:
@@ -4721,7 +4721,7 @@ if (tools.INITDB_FIRSTIME) {
|
||||
console.log(' createIndex User Index...');
|
||||
|
||||
UserSchema.index({ userId: 1 });
|
||||
UserSchema.index({ 'idapp': 1 });
|
||||
UserSchema.index({ idapp: 1 });
|
||||
|
||||
|
||||
// UserSchema.index({ username: 'text', name: 'text', surname: 'text', email: 'text' });
|
||||
@@ -5434,6 +5434,10 @@ UserSchema.statics.createNewSubRecord = async function (idapp, req) {
|
||||
|
||||
const User = mongoose.model('User', UserSchema);
|
||||
|
||||
User.createIndexes((err) => {
|
||||
if (err) throw err;
|
||||
});
|
||||
|
||||
class Hero {
|
||||
constructor(name, level) {
|
||||
this.name = name;
|
||||
|
||||
Reference in New Issue
Block a user