Updated sql create query to allow for foreign keys