title: Backup MySQL schema with foreign key table constraints
body: <p>I created my MySQL schema that consists of multiple tables and I decided that I would add the foreign key constraints afterwards for each table, using the command:</p>
  
  <pre><code>ALTER TABLE Orders
  ADD FOREIGN KEY (P_Id)
  REFERENCES Persons(P_Id)
  </code></pre>
  
  <p>How can I get a backup of the schema (containing the foreign keys) so that I can duplicate it in another machine? </p>
  
  <p>Note that <code>SHOW CREATE TABLE</code> and mysqldump do not work in my case because they only create a UNIQUE KEY constraint and not a FOREIGN KEY. </p>