Doctrine 2 association without foreign key constraints

后端 未结 6 1584
醉酒成梦
醉酒成梦 2020-12-16 03:40

I\'m in the process of converting a legacy PHP application to Symfony 2. The application data is not very consistent at the moment, so I would like to avoid creating foreign

6条回答
  •  心在旅途
    2020-12-16 04:35

    I had a problem with the same command. I got the exception:

    SQLSTATE[HY000]: General error: 1005 Can't create table 'xxx.#sql-66c_3e' (errno: 150)

    For me it helped to declare the column as unique (in your case id).

    Now app/console doctrine:schema:update runs fine again.

提交回复
热议问题