I made some updates to my symfony app:
- PHP 7.4 to 8.3
- Symfony 5.4 to 6.4
- API Platform 2.x to 3
In the process I deleted FOSUserBundle I was using. It ended with some updates to the mysql database. I’m using Doctrine migrations and I have hardtime to generate them.
If I’m running bin/console doctrine:migrations:diff
, a migration class is generated but up
and down
are empty.
However if I’m running bin/console doctrine:schema:update --dump-sql
I can see the updates I made to the database.
Is it normal? How to fix it?
2
Answers
The reason was
<up>
and<down>
in my template were never replaced by my custom generator and I still don’t know why.The command you want is
bin/console make:migration
. https://symfonycasts.com/screencast/symfony5-doctrine/migrations