Add a column to an existing entity in Symfony

前端 未结 9 1904
误落风尘
误落风尘 2020-12-22 21:27

I\'ve been playing around with Symfony on my web server and I\'ve been creating entity with doctrine for my database. I wanted to add a column to one of these entity... I wa

9条回答
  •  渐次进展
    2020-12-22 21:55

    I found a way in which I added the new column inside YourBundle/Resources/Config/doctrine/Yourentity.orm.yml.

    Then added getter and setter methods inside Entity class.

    Then did php app/console doctrine:schema:update --force from console. It worked for me.

提交回复
热议问题