Back

Problem migrating users

  • 0
  • Users
  • Self Hosted
  • Cloud
louga31
17 Jan, 2024, 19:15

Hey, I want to migrate from Self Hosted to AppWrite cloud, but I have arround 20k users but the migration tool only shows 5000 users

TL;DR
The developer is experiencing a problem with user migration. They are trying to determine the best approach for handling cases where there are over 5000 users. They are concerned that returning a string like '5000+' could cause issues. The developer suggests implementing a general API response for handling this situation. Another developer confirms that the migration tool only shows 5000 users despite them having 20k users. A solution suggested is to use cursor-based pagination to fetch all users. The developer also suggests creating a GitHub issue to clarify the display of 5000+ users.
ideclon
17 Jan, 2024, 19:34

Yes, Appwrite only counts a maximum of 5000 Documents when calling listDocuments() (internally, Users is just another Collection). I would expect it would still get all of them? But I’m not 100% sure how Migrations work.

Steven
17 Jan, 2024, 21:16
Steven
17 Jan, 2024, 21:17

it would be great if you could create a github issue for this. We should clarify this to show 5000+ or something like that

louga31
17 Jan, 2024, 22:19

That's right, it infact processed all the users despite only showing 5000

ideclon
18 Jan, 2024, 00:38

Should do something like this for general API responses, too

Steven
18 Jan, 2024, 02:59

Total is a number so returning a string like 5000+ in some cases can be problematic

ideclon
18 Jan, 2024, 03:00

Of course. I’ve been trying to think of what could be returned if it’s over 5000. I thought of perhaps -1, but I feel like that might create other issues? But I can’t quite put my finger on what.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more