CakePHP Missing Database Table Error

Posted by BRADINO on Bradino See other posts from Bradino or by BRADINO
Published on Sat, 25 Jul 2009 01:07:20 +0000 Indexed on 2010/03/23 5:22 UTC
Read the original article Hit count: 716

Filed under:

I am baking a new project management application at work and added a couple new tables to the database today. When I went into the console to bake the new models, they were not in the list...

php /path/cake/console/cake.php bake all -app /path/app/

So I manually typed in the model name and I got a missing database table for model error. I checked and double-checked and the database table was named properly. Turns out that some files inside the /app/tmp/cache/ folder were causing Cake not to recognize that I had added new tables to my database. Once I deleted the cache files cake instantly recognized my new database tables and I was baking away!

rm -Rf /path/app/tmp/cache/cake*

© Bradino or respective owner

Related posts about php