title: MySQL (InnoDB): need to delete column, and accompanying foreign key constraint and index
body: <p>Here's my table:  </p>
  
  <pre><code>CREATE TABLE `alums_alumphoto` (  
    `id` int(11) NOT NULL auto_increment,  
    `alum_id` int(11) NOT NULL,  
    `photo_id` int(11) default NULL,  
    `media_id` int(11) default NULL,  
    `updated` datetime NOT NULL,  
    PRIMARY KEY  (`id`),  
    KEY `alums_alumphoto_alum_id` (`alum_id`),  
    KEY `alums_alumphoto_photo_id` (`photo_id`),  
    KEY `alums_alumphoto_media_id` (`media_id`),  
    CONSTRAINT `alums_alumphoto_ibfk_1` FOREIGN KEY (`media_id`) REFERENCES `media_mediaitem` (`id`),  
    CONSTRAINT `alum_id_refs_id_706915ea` FOREIGN KEY (`alum_id`) REFERENCES `alums_alum` (`id`),  
    CONSTRAINT `photo_id_refs_id_63282119` FOREIGN KEY (`photo_id`) REFERENCES `media_mediaitem` (`id`)  
  ) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8  
  </code></pre>
  
  <p>I want to delete the column <code>photo_id</code>, which presumably will also require deleting the foreign key constraint and the index.</p>
  
  <p>The problem is that I get errors when I try to drop the column:  </p>
  
  <pre>ERROR 1025 (HY000): Error on rename of '.\dbname\#sql-670_c5c' to '.\dbname\alums_alumphoto' (errno: 150)</pre>  
  
  <p>... when I try to drop the index (same as above), and when I try to drop the foreign key constraint:  </p>
  
  <pre>ERROR 1091 (42000): Can't DROP 'photo_id_refs_id_63282119'; check that column/key exists)</pre>  
  
  <p>What order should I be doing all of this in?  What precise commands should I be using?</p>