Symfony 1.4 – Creating old sql tables when running build command

Posted on July 31st, 2011 by thiswayup.
Categories: Development.

Dear future self (and whoever it may concern).

You may recall that Symfony has a rather nifty feature to build your models and db from the YML file. If you rename any of the tables through YML, the old model classes are not deleted (see "flushed") from the "lib\model\doctrine" directory. Symfony's process seems to be create sql from the base classes existing in the above directory.

To solve this run the "symfony doctrine:delete-model-files" or just delete the files in "lib\model\doctrine". They really should have added the deleting of model files in "symfony doctrine:build --all"

1 comment.

haftamu

Comment on October 22nd, 2012.

Thank you Really Helped me

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.