title: SQLSTATE General Error 1005 Can't create table '#sql-3d63_ca5dc9' (errno: 150)
body: <p>I have a Symfony CRM project using Doctrine that I'm currently moving over to a new server, the CRM hooks up to OpenCart 2.</p>
  
  <p>A few of my tables have foreign keys that allow me to reference some of the OpenCart tables from my bespoke ones in my project, such as a product id to the product table and customer id to the customer table etc.</p>
  
  <p>However, when I try to run <code>doctrine:schema:update --force</code> I get the following error:</p>
  
  <blockquote>
    <p>An exception occurred while executing 'ALTER TABLE project ADD
    CONSTRAINT FK_2FB3D0EE4584665A FOREIGN KEY (product_id) REFERENCES
    oc73_product (product_id)': </p>
    
    <p>SQLSTATE[HY000]: General error: 1005 Can't create table
    'oc2017_myshop.#sql-3d63_ca5dc9' (errno: 150)</p>
  </blockquote>
  
  <p>The two statements it throws this error on are as follows:</p>
  
  <pre><code>ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EE4584665A FOREIGN KEY (product_id) REFERENCES oc73_product (product_id);
  ALTER TABLE project ADD CONSTRAINT FK_2FB3D0EEB18AFA7E FOREIGN KEY (stageName) REFERENCES stage (id);
  </code></pre>
  
  <p>I don't quite understand what the above error means, since I'm not creating a table called sql-3d63_ca5dc9? Can anyone shed any light on this?</p>
  
  <p>If anymore info is needed in order to help with this let me know and I will include.</p>