Meteor-Community-Packages/meteor-roles

forwardMigrate2 tries to drop unset index

Open

#377 opened on Aug 23, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (161 forks)batch import
buggood first issue

Repository metrics

Stars
 (919 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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

  • Meteor 2.12
  • OS: OSX
  • Browser chrome, firefox

Contributor guide