Modified sql install script - email/event constraint was not working because the foreign key was signed and the referenced key was unsigned. Foreign key is now unsigned.