开发者

symfony doctrine:build --all

开发者 https://www.devze.com 2023-03-31 15:24 出处:网络
I have started to learn symfony and I am a little bit confused. In \'practical symfony\' they explain symfony doctrine:build --model, symfony doctrine:build --sql and symfony doctrine:insert-s开发者_如

I have started to learn symfony and I am a little bit confused. In 'practical symfony' they explain symfony doctrine:build --model, symfony doctrine:build --sql and symfony doctrine:insert-s开发者_如何学Goql but then they mention symfony doctrine:build -all without explaining what tasks are included in this command.

Could anybody advice me?


build --all includes

--model             Build model classes
--forms            Build form classes
--filters          Build filter classes
--sql              Build SQL
--db               Drop, create, and either insert SQL or migrate the database


You can regenerate all your base classes using:

php symfony doctrine:build --all-classes

It regenerates model classes, forms and filters ones without changing your DB.

On an existing projet, if you have to update your schema and your DB, you should discover Doctrine migrations usage.

Here is some slides about it: http://www.slideshare.net/denderello/symfony-live-2010-using-doctrine-migrations

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号