Make migration scripts
and use createdAt instead of _id
This commit is contained in:
parent
5b80b6e901
commit
5ce6fa67d2
7 changed files with 90 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ export default ({ data }, done) => Following.findOne({ _id: data.following }).th
|
|||
}),
|
||||
|
||||
promisedFollower.then(({ followingCount }) => FollowingLog.insert({
|
||||
createdAt: data.following.createdAt,
|
||||
userId: followerId,
|
||||
count: followingCount + 1
|
||||
})),
|
||||
|
|
@ -36,6 +37,7 @@ export default ({ data }, done) => Following.findOne({ _id: data.following }).th
|
|||
}),
|
||||
|
||||
promisedFollowee.then(({ followersCount }) => FollowedLog.insert({
|
||||
createdAt: data.following.createdAt,
|
||||
userId: followerId,
|
||||
count: followersCount + 1
|
||||
})),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue