-
Notifications
You must be signed in to change notification settings - Fork 0
/
migration-steps.txt
33 lines (31 loc) · 3 KB
/
migration-steps.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
1. Export tables ( books,comments,commentscores,editorials,events,news,papers,users,votes,wp_comments,wp_posts,wp_users) from unifr.ch/phpmyadmin.
2. import these tables to local database
mysql -u root -p epf-migrate<epf20121101-1.sql --default-character-set=utf8
3. Add DB connection in settings.php:
$databases['for_migration']['default'] = array(
'driver' => 'mysql',
'database' => 'epf-migrate',
'username' => 'name',
'password' => 'pass',
'host' => 'localhost',
'prefix' => '',
);
4. empty the contents and users of the destination table(only keep the article nodes).And set user's position field:PostDoc->Postdoc
5. enable the data migration module.
6. Before import papers, commend line 113 in arxiv.module : $node->title=$item['title'];
7. import "epfuser,book,,editorial,event,news,papersArxiv,commentbook,commenteditorial,commentnews,commentpapersArxiv"
8. comment 111 has chinese characters, just insert it by hand
9. after import papers, copy the paper files to new place. //
10. import vote and view\download information
a. empty arxiv_downNo,accesslog,qtr_reputation,qtr_actions,qtr_quality,votingapi_vote,similarity tables
b. the undefined paper will be set with id=1. if the node id=1 exit, change this number.
c. import actions and votes migration
d. delete from voteapi_vote table where entity_id=1(or others as set).
11. delete the guest user
12. update node_counter table by sql:
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_editorial` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`editorials` as v inner join `drupalcopy`.`migrate_map_editorial` as e on e.sourceid1=v.id where e.destid1=nc.nid);
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_book` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`books` as v inner join `drupalcopy`.`migrate_map_book` as e on e.sourceid1=v.id where e.destid1=nc.nid);
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_event` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`events` as v inner join `drupalcopy`.`migrate_map_event` as e on e.sourceid1=v.id where e.destid1=nc.nid);
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_news` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`news` as v inner join `drupalcopy`.`migrate_map_news` as e on e.sourceid1=v.id where e.destid1=nc.nid);
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_jobs` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`news` as v inner join `drupalcopy`.`migrate_map_jobs` as e on e.sourceid1=v.id where e.destid1=nc.nid);
update `drupalcopy`.`node_counter` as nc inner join `drupalcopy`.`migrate_map_papersarxiv` as me on me.destid1=nc.nid set totalcount=(select reviewNum from `epf-migrate`.`papers` as v inner join `drupalcopy`.`migrate_map_papersarxiv` as e on e.sourceid1=v.id where e.destid1=nc.nid);