Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
920 stars 164 forks source link

forwardMigrate2 tries to drop unset index #377

Open erixtekila opened 10 months ago

erixtekila commented 10 months ago

While migrating to version 2 then 3, by using _forwardMigrate() then _forwardMigrate2(), an exception is raised https://github.com/Meteor-Community-Packages/meteor-roles/blob/ff9cad1db7d451a992763bfb6cd24354925f100d/roles/roles_server.js#L325

No such index is present in the user's collection

To Reproduce Start with a version 1 app. Add several roles. Use _forwardMigrate() then _forwardMigrate2() on it. The migration process stops on this exception

MongoServerError: index not found with name [roles._id_1_roles.scope_1]

Expected behavior A clean update of the servverside collections.

Environnement

github-actions[bot] commented 10 months ago

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously. Our goal is to provide long-term lifecycles for packages and keep up with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time. Therefore, we can't guarantee your issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit a pull request, too! We will accompany you in the process with reviews and hints on how to get development set up.

Please also consider sponsoring the maintainers of the package. If you don't know who is currently maintaining this package, just leave a comment and we'll let you know