title: How to change MySQL Primary Key from signed to unsigned?
body: <p>In my MySQL InnoDB Database with foreign keys I accidentally made some of my primary keys signed instead of unsigned as I want them to be. </p>
  
  <p>Now I want to change it with a ALTER TABLE statement but it does not work:</p>
  
  <pre><code>ALTER TABLE `users` CHANGE `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT
  </code></pre>
  
  <p>MySQL Error:</p>
  
  <pre><code>Error on rename of './db_dev/#sql-478_3' to './db_dev/users' (errno: 150)
  </code></pre>
  
  <p>I don't understand why. I am working with Foreign Keys and tried using a </p>
  
  <pre><code>SET foreign_key_checks = 0;
  </code></pre>
  
  <p>Statement before executing the ALTER TABLE from above. Doesn't work either. 
  Notice: All my tables are still empty. There's no data in it yet. </p>
  
  <p>Since the Database has a lot of tables it would be much work to drop all the foreign keys and then manually add them again. (if this should be the reason).</p>