title: ERROR 1833 (HY000): Cannot change column MySQL
body: <p>I'm trying to add auto increment to the primary key <code>person_id</code> of a person table. However when I run the command I get the following error.</p>
  
  <blockquote>
    <p>ERROR 1833 (HY000): Cannot change column 'person_id': used in a
    foreign key constraint 'fk_fav_food_person_id' of table
    'bank.favorite_food'</p>
  </blockquote>
  
  <p>for the following command.I'm using MySQL 5.7.20</p>
  
  <pre><code>mysql&gt; ALTER TABLE person MODIFY person_id SMALLINT UNSIGNED AUTO_INCREMENT;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/04zdM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/04zdM.png" alt="enter image description here"></a></p>