title: How to change bigint to int in mysql, with table having foreign keys
body: <p>I recently noticed that there are several bigint type fields in one of my databases that could be replaced with type "int". The problem is that the database is already online and in use and also that there are foreign keys in action, so when I try changing the data type in the offline DB, mysql won't let me and produces the error message: "#1025 - Error on rename of (...)".</p>
  
  <p>So how can I change these fields while keeping the foreign keys happy? (and not wiping out the existing DB!)</p>