• warning: DOMXPath::query(): Invalid expression in /var/www/ictedge/sites/all/modules/print/lib/dompdf-0.5.1/include/stylesheet.cls.php on line 573.
  • warning: DOMXPath::query(): Invalid expression in /var/www/ictedge/sites/all/modules/print/lib/dompdf-0.5.1/include/stylesheet.cls.php on line 573.
  • warning: Invalid argument supplied for foreach() in /var/www/ictedge/sites/all/modules/print/lib/dompdf-0.5.1/include/stylesheet.cls.php on line 575.

Updating constraints

This is mysql-specific: Sometimes you need to update the foreign key constraint. First drop the key, then add it with the new constraint requirements, such as on update cascade:

ALTER TABLE zeprs.patient DROP FOREIGN KEY FKD0D3EB057D2B7913;
ALTER TABLE zeprs.patient ADD CONSTRAINT FKD0D3EB057D2B7913 FOREIGN KEY (`site_id`) REFERENCES `site` (`id`) ON UPDATE CASCADE;

You may add this type of sql statement into the App updates sql console in the admin section to have this automatically run when the app starts.