/
home
/
infinitibizsol
/
.trash
/
db.3
/
File Upload :
llllll
Current File: /home/infinitibizsol/.trash/db.3/updateDb.js
import db from "../model/index"; async function updateDbCollections() { try { // Fetch all systems const systems = await db.System.find(); // Iterate over each system and update the fields for (let system of systems) { system.guided_workflow = system.guided_workflow === false || false; system.popup_important_notes = system.popup_important_notes === false || false; await system.save(); } console.log("Field renamed successfully"); } catch (err) { console.error("Error during migration:", err.message); } } export default updateDbCollections;
Copyright ©2k19 -
Hexid
|
Tex7ure