Store date on production server

I have a problem with date column, I save the data on the local server, but the date column is not saved on the production server, when the patch entity the column is not even written (not visible), no error … please help. I have everything same 1:1.

Local server:

		'date' => object(Cake\I18n\FrozenDate) {
			'time' => '2020-05-28 00:00:00.000000+02:00',
			'timezone' => 'Europe/Prague',
			'fixedNowTime' => false
		},

Production server:

		'date' => null,

Problem solved, I cleared all caches and it works. Does anyone know why this affects the cache?

It’s time consuming to built the list of columns and their types for tables, so the system does it once and caches it. When patching, it uses that cached information to determine what columns are there; trying to save into a column that doesn’t exist will cause SQL errors, after all, so it wants to avoid that. Every time you change anything about your schema, you need to clear the cache, so that it will be rebuilt with new details.

1 Like