Difference between Symfony/Doctrine commands “make:migration” and “doctrine:migrations:diff”

前端 未结 2 1091
长发绾君心
长发绾君心 2021-01-19 02:25

Is there a differences between the Symfony console command make:migration and doctrine:migrations:diff?

相关标签:
2条回答
  • 2021-01-19 02:56

    make:migration will create empty file for you so you can write your custom migration

    doctrine:migrations:diff will compare your current database schema with entities mappings and if there is difference then it will create migration so you can update you database schema to reflect your entities mappings

    0 讨论(0)
  • 2021-01-19 03:14

    There is no difference between these two commands.

    make:migration is simply a Symfony provided wrapper for the Doctrine command.

    You can run either to the exact same effect. But the symfony one requires that you have the Symfony Maker bundle, which otherwise it not required.

    0 讨论(0)
提交回复
热议问题