title: Help with: ERROR 1025 (HY000): Error on rename of .... (errno: 150)
body: <p>I am getting this error when I am trying to run an alter table command to drop a column:
  ERROR 1025 (HY000): Error on rename of .... (errno: 150).  </p>
  
  <p>If I understand correctly it is a foreign key problem, but I do not have a clue how to fix it. Would somebody be so kind and tell me how to get it working.</p>
  
  <p>The code used for creating table:</p>
  
  <pre><code>CREATE TABLE categories(
  cid INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
  assets_id INT NOT NULL,
  cat_name VARCHAR(30) NOT NULL,
  INDEX(assets_id),
  FOREIGN KEY (assets_id) REFERENCES asset(aid) ON UPDATE CASCADE
  
  )
  ENGINE=INNODB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>The alter command:</p>
  
  <pre><code>ALTER TABLE categories DROP COLUMN assets_id;
  </code></pre>
  
  <p>The table categories is completely blank. So there is no information to set off the CASCADE restrictions. So could you help me what kind of wizardry do I need to delete the column assets_id. Thank you.</p>