add userId to migrateFolder (#4829)

after migration folders are blown up because folder has no userId.
This commit is contained in:
Ch. (Chanhwi Choi) 2019-05-02 06:24:54 +09:00 committed by syuilo
parent 318ae0035f
commit fe1e7770f9

View file

@ -184,6 +184,7 @@ async function main() {
async function migrateDriveFolder(folder: any) { async function migrateDriveFolder(folder: any) {
await DriveFolders.save({ await DriveFolders.save({
id: folder._id.toHexString(), id: folder._id.toHexString(),
userId: folder.userId.toHexString(),
createdAt: folder.createdAt || new Date(), createdAt: folder.createdAt || new Date(),
name: folder.name, name: folder.name,
parentId: folder.parentId ? folder.parentId.toHexString() : null, parentId: folder.parentId ? folder.parentId.toHexString() : null,