Symfony 1.4 - will "doctrine:build-model" destroy the data in the database?

298 Views Asked by At

I am a bit new to Symfony. I have encountered this issue: Unknown record property / related component "permissions" on "sfGuardUser"

Its solution mentioned there is deleting certain files in lib/model/doctrine/base/. However, I want to know if we are going to rebuild model, what will be the impact.

On this page you can see: http://oldforum.symfony-project.org/index.php/m/102097/ someone mentioned that a permanent fix is to delete these files as well as fix the schema. And then we will build:model again.

So will this delete the data in the database? Whats the impact of doctrine:build command on symfony?

1

There are 1 best solutions below

0
On

Short answer: no, doctrine:build-model won't drop any data in your database. It will only overwrite your base model classes in lib/model/base and create model files if they don't exist.

From the sfDoctrineBuildTask class, doctrine:build will "build" what you give in option. That means "doctrine:build --model" is the same as "doctrine:build-model". But I guess in many symfony 1.4 tutorials like Jobeet, they only use "doctrine:build --model"