Hi there!
I would like to cancel the mandatory of a field of my current schema. How can I accomplish that with a symfony migration?
Thanks in advance, Best regards!
Hi there!
I would like to cancel the mandatory of a field of my current schema. How can I accomplish that with a symfony migration?
Thanks in advance, Best regards!
Migrations are intended to alter database, not schema. So you have to alter your schema yourself.
Also, for me best and cleanest way is to edit schema manually (just remove notnull: true
on desired column) and issue symfony doctrine:generate-migrations-diff
. This will generate new migration class which you have to review and test (with symfony doctrine:migrate --env=dev
).