Page Properties | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
Background
Going forward we would like to get everyone using a single SlideWiki deployment, that is slidewiki.org. The deployment on stable.slidewiki.org has been used for the trials, and includes decks, users, groups, as well as activity data related to the trials. We are actively going to be promoting the new site, and it would be highly desirable to have as much as possible moved to slidewiki.org.
...
More specifically, the database collections that would need to have their IDs shifted are as follows (snapshot of 22/1/2018) :
collection | max_id in stable | max_id in slidewiki.org | suitable offset | unique fields |
---|---|---|---|---|
decks | 11589 | 105836 | 200000 | |
slides | 51539 | 696940 | 800000 | |
usergroups | 95 | 4006 | 5000 | |
users | 2895 | 15627 | 20000 | email, username |
tags | 161 | 896 | 1000 | tagName |
Updating the ids of the above collection would also result in updating some fields in the following additional collections (the tool already handles that for all). These collections do not have sequential ids, so they are using the ObjectId provided by mongodb. We can therefore merge them with the collections in slidewiki.org without issue.
...
- of the 2887 users on stable,:
- 2395 users are registered in slidewiki.org with the same email
- of those, 2331 users share the same id as well, so any references to those users in stable data need no updating
- the remaining 64 occur across databases with different ids, so those should be updated in stable data to have the same ids as in slidewiki.org
- of the 492 users that are not matched with any user in slidewiki.org using the email:
- 25 users occur across databases with the same username
- 2395 users are registered in slidewiki.org with the same email
- data on stable only references 345 users (content, metadata, activities, etc)
- of them 264 are not registered with slidewiki.org
- 21 occur across databases with the same username
- of them 264 are not registered with slidewiki.org
The tools include a command, matchusers
that update the user ids of those users (64 in the above breakdown) in source (stable) that have matching emails in target (slidewiki.org), and also updates the references thereof. During this process a user in stable may be matched to a user in slidewiki.org that has the same id as some other user in stable. For this reason, before issuing the matchusers
command we would first shift all user ids by an offset, using the shiftids
command.
...
- copy them to slidewiki.org:
- we keep them in the stable database dump we are going to load on slidewiki.org
- there are still going to be 25 users in slidewiki.org with duplicate usernames, so we could patch them e.g. by appending a '_' character to one of them until we have no duplicates
- we should re-check for duplicate emails or usernames, as some user on stable may have registered on slidewiki.org while we were preparing the data dump from stable → there are scripts already for that in the user-service
- do not copy them to slidewiki.org:
- it is not a requirement to migrate any credentials from stable to slidewiki
- we should somehow handle the reference to those users from the other collections on stable, Handle deactivated users has some specifications that may be useful, but nothing is implemented as of yet
Since most data refers to users not in slidewiki.org, it would make sense and may be also somewhat safer to do copy those users over to slidewik.org
Future of stable
Since the goal of this task is to get everyone (including partners) using slidewiki.org, we also need to decide what to do about stable.slidewiki.org. Whatever the decision, it only makes sense that any data on stable would not be generally retained, much like we do with data on experimental or testing.
...