diff --git a/src/api/models/signin.ts b/src/api/models/signin.ts index 262c8707e..62ee796d8 100644 --- a/src/api/models/signin.ts +++ b/src/api/models/signin.ts @@ -7,6 +7,11 @@ export default Signin; export interface ISignin { _id: mongo.ObjectID; + createdAt: Date; + userId: mongo.ObjectID; + ip: string; + headers: any; + success: boolean; } /** diff --git a/tools/migration/shell.camel-case.js b/tools/migration/shell.camel-case.js index a7e8afcdc..533868cdc 100644 --- a/tools/migration/shell.camel-case.js +++ b/tools/migration/shell.camel-case.js @@ -180,3 +180,10 @@ db.posts.update({}, { '_repost.user_id': '_repost.userId', } }, false, true); + +db.signin.update({}, { + $rename: { + created_at: 'createdAt', + user_id: 'userId', + } +}, false, true);