meteor-partitioner icon indicating copy to clipboard operation
meteor-partitioner copied to clipboard

How to use with an app with existing data?

Open sferoze opened this issue 9 years ago • 1 comments

I have an app currently in use with user data. I want to add this package, but how can I do so and connect the existing data to certain groups.

sferoze avatar May 02 '16 13:05 sferoze

  1. Partition your Collection according to the readme
  2. Update your docs and give them the field _groupId: 'tenantid'

So a todo-list item

{
   _id: 'xxaxadasdasd',
  entry: 'entryname',
}

becomes
{
   _id: 'xxaxadasdasd',
  _groupId: 'tenantid'
  entry: 'entryname',
}

thebarty avatar May 22 '16 13:05 thebarty