Remove player_vehicles Foreign Key Constraint
Learn how to remove the player_vehicles_ibfk_1 foreign key constraint from your MySQL database to fix vehicle insert errors for gang, job, and shared vehicles in FiveM QBCore/QBOX servers.
Overview
Cannot add or update a child row: a foreign key constraint fails
(`otherplanet_server`.`player_vehicles`, CONSTRAINT `player_vehicles_ibfk_1`
FOREIGN KEY (`citizenid`) REFERENCES `players` (`citizenid`)
ON DELETE CASCADE ON UPDATE CASCADE)Goal
player_vehicles_ibfk_1Step 1 - Open Your Database
Step 2 - Remove the Constraint
Last updated