title: How do I rename a foreign key in mysql?
body: <p>We've just completed a long-running migration on a large table, and ended up with the following constraint on our conversation_tags table:</p>
  
  <pre><code>CONSTRAINT `conversation_tags_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`)
  </code></pre>
  
  <p>Unfortunately, there was a bug somewhere, because what we wanted was:</p>
  
  <pre><code>CONSTRAINT `fk_conversation_tags_tags` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`)
  </code></pre>
  
  <p>Dropping and re-adding the constraint would mean another two long queries.  Is there any way to rename the constraint in a single query?</p>