You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Doctrine\ORM\Tools\SchemaTool::updateSchema the documentation states that "If $saveMode is set to true the command is executed in the Database, else SQL is returned.". That is wrong since the method never returns anything.
What actually happens when $saveMode is true is that the method calls toSaveSql instead of toSql in SchemaDiff which produces a non-destructive update. The details can be found in the documentation of Doctrine\DBAL\Schema\SchemaDiff::toSaveSql(). This is very useful, for example, when you want to do a partial update of the schema, you need $saveMode set to true otherwise updateSchema would drop all the tables not included in the update, learned that the hard way.
The text was updated successfully, but these errors were encountered:
In
Doctrine\ORM\Tools\SchemaTool::updateSchema
the documentation states that "If $saveMode is set to true the command is executed in the Database, else SQL is returned.". That is wrong since the method never returns anything.What actually happens when
$saveMode
is true is that the method callstoSaveSql
instead oftoSql
inSchemaDiff
which produces a non-destructive update. The details can be found in the documentation ofDoctrine\DBAL\Schema\SchemaDiff::toSaveSql()
. This is very useful, for example, when you want to do a partial update of the schema, you need$saveMode
set to true otherwiseupdateSchema
would drop all the tables not included in the update, learned that the hard way.The text was updated successfully, but these errors were encountered: