I’m using node.js with a remote MySQL database. When I go to delete the integer in the reference field of one of my tables I get this error:
Same when trying to remove it by updating it to nothing in my application:
{status: “500”, code: “ER_TRUNCATED_WRONG_VALUE_FOR_FIELD”,…}
I’ve tried setting On Update and On Delete to Set NULL or No Action but nothing has solved it. The only solve I’ve found is using DBeaver and manually setting the value to NULL.
When an appointment is created the foreign key is null then when a driver is assigned to it the foreign key updates to the driver id. However, the issues arises when I try and remove the driver/driver_id/foreign key from the appointment.