Fix remaining issues with schema:

+ Remove invalid datatypes.
+ Reorder create statements.
+ Remove invalid foreign key references.
+ Import into PostgreSQL.