i need to insert one collection data to another collection. how can i write migration script for this purpose. card payments and corporate customer payment are two collections.
corporate customer payment collection has below attributes customerID,outsTanding,date,amount,headOfficeId,insertDate
cards payment collection has below attributes customerID,amount,card,packageId,cardId,classType,expireDate,headOfficeId,insertDate
i’m inserting cards payment collection following datas to corporate customer payment collection.
CustomerID -> card.customerID
outsTanding -> card.cartId
date -> card.insertDate
amount -> card.amount
so how can i apply this change for old datas. how need i write meteor migration for up and down functions. anyone who had this issue assist me. thanks