title: mysql add constraint (ALTER) how to put them in order
body: <p>I am trying to make sure when I mysqldump the database that the constraint are in numeric order after doing the below query. When I do a dump without AFTER (which doesn't work) it shows phppos_sales_ibfk_3 as the first constraint. </p>
  
  <pre><code>ALTER TABLE `phppos_sales`
    ADD CONSTRAINT `phppos_sales_ibfk_3` FOREIGN KEY (`location_id`) REFERENCES `phppos_locations` (`location_id`);    
    ADD CONSTRAINT `phppos_sales_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `phppos_employees` (`person_id`),
    ADD CONSTRAINT `phppos_sales_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `phppos_customers` (`person_id`),
  </code></pre>
  
  <p>Code I am trying to do to alter <code>phppos_sales</code></p>
  
  <pre><code>ALTER TABLE `phppos_sales`
     ADD CONSTRAINT `phppos_sales_ibfk_3` AFTER `phppos_sales_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `phppos_locations` (`location_id`);
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AFTER `phppos_sales_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `phppos_locat' at line 6 
  </code></pre>