nedb icon indicating copy to clipboard operation
nedb copied to clipboard

ensureIndex bug?

Open ariesclark opened this issue 5 years ago • 2 comments

Database file repeats the following over 200 times in my file, ever increasing.

{"$$indexCreated":{"fieldName":"username","unique":true}}
{"$$indexCreated":{"fieldName":"id","unique":true}}
let database = Datastore.create("/app/data/users.db");
database.ensureIndex({ fieldName: "username", unique: true });
database.ensureIndex({ fieldName: "id", unique: true });

using https://www.npmjs.com/package/nedb-promises as a wrapper for Promises.

ariesclark avatar Dec 06 '19 17:12 ariesclark

have you resolved this bug? I face it too

tienskowl avatar Jun 28 '20 15:06 tienskowl

I did not, I just ended up deleting the file every time.

On Sun, Jun 28, 2020 at 9:27 AM coderkang [email protected] wrote:

have you resolved this bug? I face it too

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/louischatriot/nedb/issues/618#issuecomment-650780324, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOIAXJ3SXOPHQAZZ5SR633RY5OMNANCNFSM4JW5CUCA .

ariesclark avatar Jun 30 '20 01:06 ariesclark