I'm trying to drop a foreign key column in a table I have named ProductInvoice. The column I'm trying to drop is named PersonID and is from the table Person. When I run the query
ALTER TABLE ProductInvoice
DROP COLUMN PersonID;
I get this error...
Error Code: 1025. Error on rename of './jkripal/#sql-91c_19ff0' to './jkripal/ProductInvoice' (errno: 150)
Any advice on how to troubleshoot this? I've looked around this site and can't find any answers that help.
These are the results from SHOW CREATE TABLE ProductInvoice
'ProductInvoice', 'CREATE TABLE `ProductInvoice`
(\n `ProductInvoiceID` int(11) NOT NULL AUTO_INCREMENT,
\n `PersonID` int(11) DEFAULT NULL,
\n `ProductID` int(11) NOT NULL,
\n `InvoiceID` int(11) NOT NULL,
\n `TravelDate` varchar(255) DEFAULT NULL,
\n `TicketNote` varchar(255) DEFAULT NULL,
\n `Quantity` int(11) DEFAULT NULL,
\n `InsuranceTicketCode` varchar(255) DEFAULT NULL,
\n PRIMARY KEY (`ProductInvoiceID`),
\n KEY `fkPerson` (`PersonID`),
\n KEY `fk_ProductInvoice_to_Product` (`ProductID`),
\n KEY `fk_ProductInvoice_to_Invoice` (`InvoiceID`),
\n CONSTRAINT `ProductInvoice_ibfk_1` FOREIGN KEY (`PersonID`) REFERENCES `Person` (`PersonID`),
\n CONSTRAINT `ProductInvoice_ibfk_2` FOREIGN KEY (`ProductID`) REFERENCES `Product` (`ProductID`),
\n CONSTRAINT `ProductInvoice_ibfk_3` FOREIGN KEY (`InvoiceID`) REFERENCES `Invoice` (`InvoiceID`)
\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8'