1

I recently upgraded my local wampserver therefore updating MySQL. The strict mode as they have enabled by default is causing me some headaches.

The requirement to add default values (which is to me a little overdone. but who am I) is a big issue to me.

The system I created stopped working because of this grinding my entire operation to a halt.

The error I am getting :

: Field 'pageoptions_description' doesn't have a default value

Now I added a default value :

ALTER TABLE `serene_pageoptions` 
CHANGE `pageoptions_description` `pageoptions_description` 
TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL; 

However to no avail. Still getting the same error that the field does not have a default value. Default value is NULL. But this does not seem to be correct.

Is there anything I am missing?

CLAbeel
  • 1,078
  • 14
  • 20
Alex
  • 1,223
  • 1
  • 19
  • 31

1 Answers1

0

I think the default value is always null, even if no default is defined. So your ALTER TABLE statement didn't really do anything. Saying that the default value is null is the same as having no default; it's not the same as saying that any missing values will be populated by nulls.

Here's a snap of one of the tables in my db, in which I haven't defined any defaults: enter image description here

The default value is already null for every column. Can you think of another value that would make sense as a default for your column?

CLAbeel
  • 1,078
  • 14
  • 20