Removed engine=myisam and exceeding trailing chars at EOF
Removed MySQL specific code. Started working on foreign keys.
Started reconstructing tables with foreign keys and unique constrains
Code is PostgreSQL complaint now
Fixed minor errors

References keys on table curr_stated_relationship_f did not point to right table - missing _f
Added drop cascade to successfully whip the previous tables and content -  Foreign keys prevent dropping a single table.
Created PostgeSQL and MySQL files