Is it possible to run the task “symfony doctrine build --all” on only one table?

落花浮王杯 提交于 2019-12-19 10:22:21

问题


If I run the folowing task, it builds everything and wipes out the database:

php symfony doctrine build --all

I would like this task to run only for the new table that I've put in schema.yml

Is it possible ?


回答1:


I think you should use migration for that.

First, you need to restore the initial state (when schema, model and db are in sync). Remove your changes form schema.yml rebuild your model php symfony doctrine:build --all-classes and import the original database.

After that make your changes in schema.yml and run these commands:

php symfony doctrine:generate-migrations-diff
php symfony doctrine:migrate
php symfony doctrine:build --all-classes


来源:https://stackoverflow.com/questions/9856243/is-it-possible-to-run-the-task-symfony-doctrine-build-all-on-only-one-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!