You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
400 B
17 lines
400 B
'use strict';
|
|
|
|
/* globals db */
|
|
|
|
const cursor = db.linkvisits.find({ });
|
|
while (cursor.hasNext()) {
|
|
const linkVisit = cursor.next();
|
|
print(`porting link visit: ${linkVisit._id.toString()}`);
|
|
db.resourcevisits.insertOne({
|
|
_id: linkVisit._id,
|
|
created: linkVisit.created,
|
|
resourceType: 'Link',
|
|
resource: linkVisit.link,
|
|
user: linkVisit.user,
|
|
geoip: linkVisit.geoip,
|
|
});
|
|
}
|