So you want to script all ForeignKeys of all tables in your original database (because in the customers database they are missing)?
This seems to be right easy, with the only disadvantage that the script also contains the creation of the tables.
However, since the ForeignKeys are at the end of...