# RUN MANUALLY AND FILL DELETE STATEMENT WITH RESULT
SELECT GROUP_CONCAT(DISTINCT estOrderDetails.OrderID SEPARATOR "','") FROM estOrderDetails
  LEFT JOIN estOrderTable ON estOrderDetails.OrderID = estOrderTable.OrderID
WHERE estOrderTable.OrderID IS NULL;
# FILL DELETE STATEMENT WITH RESULT FROM ABOVE
DELETE FROM estOrderDetails WHERE OrderID IN ();

# RUN MANUALLY AND FILL DELETE STATEMENT WITH RESULT
SELECT GROUP_CONCAT(DISTINCT estOrderListItems.OrderID SEPARATOR "','") FROM estOrderListItems
  LEFT JOIN estOrderTable ON estOrderListItems.OrderID = estOrderTable.OrderID
WHERE estOrderTable.OrderID IS NULL;
# FILL DELETE STATEMENT WITH RESULT FROM ABOVE
DELETE FROM estOrderListItems WHERE OrderID IN ();

# RUN MANUALLY AND FILL DELETE STATEMENT WITH RESULT
SELECT GROUP_CONCAT(DISTINCT estOrderListPanels.OrderID SEPARATOR "','") FROM estOrderListPanels
  LEFT JOIN estOrderTable ON estOrderListPanels.OrderID = estOrderTable.OrderID
WHERE estOrderTable.OrderID IS NULL;
# FILL DELETE STATEMENT WITH RESULT FROM ABOVE
DELETE FROM estOrderListPanels WHERE OrderID IN ();

ALTER TABLE `estOrderTable` ENGINE=INNODB;
ALTER TABLE `estOrderDetails` ENGINE=INNODB;
ALTER TABLE `estOrderListItems` ENGINE=INNODB;
ALTER TABLE `estOrderListPanels` ENGINE=INNODB;

ALTER TABLE `estOrderDetails` ADD CONSTRAINT `orderdetails_fk1` FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE `estOrderListItems` ADD CONSTRAINT `orderlistintems_fk1` FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE `estOrderListPanels` ADD CONSTRAINT `orderlistpanels_fk1` FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON UPDATE CASCADE ON DELETE CASCADE;