I cannot update a datetime type value in a table. (VIGENCIA) I`m using AdonisJS and Lucid models, and MySQL, but no matter what i try it remains the same. Sorry for english second language.
const user = await auth.getUser();
const pack = await Paquete.find(request.all().selectedPackage);
let userUpdate = await Usuario.find(user.id);
console.log(userUpdate);
userUpdate.VIGENCIA.setDate(userUpdate.VIGENCIA.getDate()+pack.VALIDEZ);
userUpdate.SALDO_CLASES = userUpdate.SALDO_CLASES+pack.CLASES;
let payment = new Pago();
payment.VALIDEZ = userUpdate.VIGENCIA;
payment.PAQUETES_id= pack.id;
payment.CLIENTES_id = userUpdate.id;
await userUpdate.save();
await payment.save();
It updates SALDO_CLASE value without an issue. The current piece of code is the last thing i tried.