CakePHP Missing Database Table Error
- by BRADINO
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*