After renaming some tables I get the following error:
MariaDB [testdb]> INSERT INTO user_events (date, uid, operation, info) VALUES('2022-09-15','xyz','create',NULL);ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails `testdb`.`user_events`, CONSTRAINT `user_events_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `associations` (`uid`))
The reason is that the table associations
in REFERENCES
needs to be changed to users
.
What is the easiest way of achieving this?