title: adding a primary key when a foreign key already exists
body: <p>I need to add a primary key on a table "usernames"</p>
  
  <p>I have 3 columns in it :</p>
  
  <pre><code>userid int(10)
  username char(20)
  user char(50)
  </code></pre>
  
  <p>and the primary key is set on 'username' field and i used it as a foreign key to link it to another table. Now i need to add primary key on 'userid' field also... so i tried out :</p>
  
  <pre><code>alter table `usernames` drop primary key, add primary key(userid,username);
  </code></pre>
  
  <p>and i get an error saying</p>
  
  <pre><code>ERROR 1553 (HY000): Cannot drop index 'PRIMARY":needed in a foreign key constraint 
  </code></pre>
  
  <p>is there any possible way to do this ??</p>