WIP Added model, migration and bulk upsert fnc.
This commit is contained in:
@@ -7,7 +7,8 @@ const bulkUpsertPriceHistory = async priceHistoryData => {
|
||||
const order = [["realEstateId", "desc"]];
|
||||
|
||||
return await db.PriceHistory.bulkCreate(priceHistoryData, {
|
||||
order
|
||||
order,
|
||||
ignoreDuplicates: true
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("Error bulk upserting priceHistory : ", e);
|
||||
|
||||
Reference in New Issue
Block a user