Generation of same SQL even after changing Schema.yml | Symfony | Doctorine
anoopsachari | May 15, 2010 | Comments 3
Symfony have updated its ORM to doctrine and me too have update myself to new ORM . I was able to follow the jobeet tutorial
- wrote yml schema
- generated the model
- generated sql and successfully completed the project .
When i tried to customize the schema.yml by updating the schema , deleting and adding new tables . But after building the model and sql i found that along with new tables old ones were also generated . Tried the same even after clearing the cache but no use . I couldn’t find a fix for the problem on net . After wasting hours on system i found a fix for it and here is it .
Fix :
Goto : project_root\lib\model\doctrine – you can find some class files and a folder named base , delete all class files in doctrine and base directory . and try building the model and sql after clearing the cache .
You have fixed the error .
Hope the post helped you !
Filed Under: symfony
About the Author: a holistic web developer , movie buff and technical blogger from queen of arabian sea.







there is also better way to do this. symfony has a special task for this situation
$php symfony doctrine:clean-model-files
@hribo wow that’s a great thing . thanx for your share .
Hi Anoopschari,
This doesn’t seem like it should of reproduced the old tables. Perhaps, you missed something in your original approach.
Clearing your cache seems like you are using a hammer to kill a fly. I would try it again maybe it was just a temporary problem.
Although, I do like Hribo’s solution!
Shane Hatfield,
Webmaster at easyastralprojection.com