Symfony2 Doctrine schema update fails

前端 未结 5 1194
不知归路
不知归路 2021-02-07 11:53

I created database on my local machine. After moving my project to server I imported backup from local (because I had some important data there).

Now,when I\'m trying t

5条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 12:36

    you need to add a value related to the field in the new table.

    For example: if you have table A and B, and B is have the key of A (a_id) then you need to add a field in A with id = 1 and in the table B the a_id need to be changed to a value from A table - 1 in this case (make this for all the fields).

    After that run : php app/console doctrine:schema:update --force

    Regards

提交回复
热议问题