Closed macrozone closed 2 years ago
i think this is because of collection2 cleaning out the data. what is the correct schema for v2?
the schema that can be used is:
roles: {
type: Array,
optional: true,
},
'roles.$': {
type: Object,
blackbox: true,
},
i am about to update an older app to v2.
i updated to 2.0.0 first and run
Package['alanning:roles'].Roles._forwardMigrate()
, but this basically removes everyone from all roles. Anyone has an idea what went wrong?We have seed data that calls
Roles.addUsersToRoles(userId, 'admin', Roles.GLOBAL_GROUP);
,after that i update to v2 and run
Package['alanning:roles'].Roles._forwardMigrate()
. Then, the admin user above has an empty role array. Also theRoles
collection only contains