title: Can't create table (errno: 150)
body: <p>Im trying to create a table in MySQL:</p>
  
  <pre><code>CREATE TABLE band ( 
      id int NOT NULL AUTO_INCREMENT, 
      name varchar(255) NOT NULL ,
      frontman int NOT NULL ,   
      PRIMARY KEY(id), 
      FOREIGN KEY(frontman) references person(id)  
  )  
  </code></pre>
  
  <p>The new table will have a foreign key to this table:</p>
  
  <pre><code>CREATE TABLE person (
      id int NOT NULL AUTO_INCREMENT,
      nick varchar(255) NOT NULL,
      password varchar(255) NOT NULL,
      admin boolean,
      PRIMARY KEY(id)
  )
  </code></pre>
  
  <p>and the error is :</p>
  
  <pre><code>#1005 - Can't create table 'apptestdb.band' (errno: 150)
  </code></pre>
  
  <p>Any ideas whats wrong? Thank you.</p>