title: spring boot Cannot add foreign key constraint
body: <p>when I running my project with spring boot 1.3.3,I get this ERROR:</p>
  
  <pre><code>.   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v1.3.3.RELEASE)
  
  2017-08-21 15:59:45.538 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000388: Unsuccessful: alter table qa_business_account add constraint FK_kr5ew7lgiv482tmmv3q0n0ny3 foreign key (business_id) references qa_shared_business (id)
  2017-08-21 15:59:45.540 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : Cannot add foreign key constraint
  2017-08-21 15:59:45.765 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000388: Unsuccessful: alter table qa_business_partner add constraint FK_on7gqlbhqdqsfgel0tuebc82h foreign key (business_id) references qa_shared_business (id)
  2017-08-21 15:59:45.765 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : Cannot add foreign key constraint
  2017-08-21 15:59:45.977 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000388: Unsuccessful: alter table qa_business_partner add constraint FK_o5bkc0vxbgebjkg34o2ccd6au foreign key (social_id) references qa_business_social_connection (id)
  2017-08-21 15:59:45.978 ERROR 5564 --- [  restartedMain] org.hibernate.tool.hbm2ddl.SchemaUpdate  : Cannot add foreign key constraint
  </code></pre>
  
  <p>but the project is working. No effect on function
  now I want use spring boot 1.5.6
  when I running the same code,I get an Execption:
  like this</p>
  
  <pre><code>Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882)
      at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:370)
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:359)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)
      ... 21 common frames omitted
  Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table qa_business_account add constraint FK963742xi8os0e9gd45ftfh8a5 foreign key (business_id) references qa_shared_business (id)]
      at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59)
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431)
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420)
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyForeignKeys(SchemaMigratorImpl.java:386)
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:214)
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134)
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:472)
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879)
      ... 27 common frames omitted
  Caused by: java.sql.SQLException: Cannot add foreign key constraint
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
      at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
      at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
      at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
      at com.sun.proxy.$Proxy87.executeUpdate(Unknown Source)
      at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56)
      ... 37 common frames omitted
  </code></pre>
  
  <p>I cannot modify the tables,add the foreign key.</p>
  
  <p>So,what should I do to make it right</p>