How to move deposits between users
|This page contains out of date information and may no longer work or be superseded by a better technique.|
This is the recipie for changing who apparently deposited an eprint. It requires logging into mysql and running the commands by hand.
First you need to know the userid number of the "from" user and the "to" user. Given their usernames we can find out their userid's. Replace USERNAME_GOES_HERE with the username of the user you want to find the ID of.
SELECT userid FROM users WHERE username='USERNAME_GOES_HERE';
The response will be something like this:
+--------+ | userid | +--------+ | 23 | +--------+ 1 row in set (0.00 sec)
That means they are userid 23. Do this for both the user you are moving eprints from and the one you are moving them to.
!! Moving EPrints in the live repository
To just transfer eprints in the main repository: (replace TO_USERID and FROM_USERID with the numbers you just found out).
UPDATE archive SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
!! Moving all EPrints
If you want to apppy the change to the user workarea, editorial review etc. you need to run the SQL for all four tables:
UPDATE inbox SET userid=TO_USER_ID WHERE userid=FROM_USER_ID; UPDATE archive SET userid=TO_USER_ID WHERE userid=FROM_USER_ID; UPDATE buffer SET userid=TO_USER_ID WHERE userid=FROM_USER_ID; UPDATE deletion SET userid=TO_USER_ID WHERE userid=FROM_USER_ID;
!! Metadata (abstract) pages
The eprint metadata summary pages will not be updated with this new information until you run: