Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP not getting all fields from DB?

I have 2 vhosts on my server (dev and prod) the code on both is the same, they both connect to the same database.

However, I added a new column to the table I am pulling data from and dev sees this new column, and prod does not.

I know the code is the same because they are both clones of the same repository and both updated to the latest code.

I confirmed I am dealing with the same data by altering one of the other field values and I see the change on both sides. However I keep adding new columns and dev continues to see all the new columns while prod does not. Prod does see all the columns that were there previous to today.

This does not make any sense to me. I feel like I have taken the steps to prove that this should not be happening and yet it is.

What else could it be? What could be a possible cause that I have overlooked?

like image 281
JD Isaacks Avatar asked Nov 08 '11 20:11

JD Isaacks


1 Answers

Are all directories cloned? If '/app/config/core.php' has different debug values, I'm guessing this would be your problem. Debug levels 1 & 2 both refresh model caches at each request. Debug level 0 does not.

You could also manually force Cake to refresh the models by deleting the cached models in '/app/tmp/cache' directory on the production machine.

like image 125
Farray Avatar answered Oct 18 '22 21:10

Farray