Disable/enable foreign key checks before/after creating tables

Executing sql file fails because foreign keys that don't exist yet are being referenced, so I turned of the check at the beginning of the file and re-enabled it at the end of the file to allow the tables to be created without error.