Reputation: 15494
When I was using Symfony in my local machine if I needed to update my database schema (lets say, add a new column to a table) I modified the entity file and then I run php console doctrine:schema:update --force
. Now my code is on a remote server (no SHH access available). I can just modify the entity again and then using phpMyAdmin to modify the table and in that way I will not need to execute the update command, but Im not sure if this is correct.
Upvotes: 0
Views: 478
Reputation: 41934
As said in the documentation, using doctrine:schema:update --force
is powerfull, but not the best way:
An even better way to take advantage of this functionality is via migrations, which allow you to generate these SQL statements and store them in migration classes that can be run systematically on your production server in order to track and migrate your database schema safely and reliably.
Take a look at the link in the quote (to DoctrineMigrationsBundle
) how this works.
Upvotes: 2