The table creation queries were updated.

The way the foreign key reference queries are written may need to be checked.