Open dominicrico opened 4 years ago
Hi @dominicrico, thanks for the idea and kind words! That's good idea, I will consider it for future releases.
@pkosiec I agree with @dominicrico this would be a great feature to add. Would you be open to a PR for this functionality? I'm not 100% sure how it could be implemented yet but looking at this line it seems like it would need changed to handle the duplicate case.
Edit: Setting the ordered param to false seems promising: https://stackoverflow.com/questions/61480444/mongodb-insertmany-and-skip-duplicates
Hi @ronan-f 👋, sorry for a long delay.
Sure thing! The PR that implements this functionality is very welcome (as far as it is opt-in feature that doesn't break existing behavior) 🙂 Cheers!
Like other ORM-based seeders, it would be awesome if the seeding runs would be stored in collection to prevent duplicates within the seeded collection. For example sequelize (mysql orm) is storing timestamp and file names in a separate table to prevent that.
Keep up the good work!