Updated SQL schemas for FOREIGN KEY changes to remedy 150 error

When attempting too run a clean install the scripts\install.php file, I ran into several errors which prevented the database from configuring properly. This commit fixes those errors by matching the FOREIGN KEY column types & moving the order of execution for a couple of the scripts to allow tables to exist prior to FOREIGN KEY mapping.