Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Daryn on June 16, 2017, 12:43:17 AM

Title: Attempting Upgrade to 2.1, Error in upgrade script
Post by: Daryn on June 16, 2017, 12:43:17 AM
I'm attempting to upgrade a 2.0.14 forum to 2.1 from github.

The server is Ubuntu 16.04, Apache 2.4, PHP 7.1, MySQL 5.7. I have another forum running vb 5 working just fine on this setup.

After the upgrade to Ubuntu 16.04 SMF 2.0.14 no longer worked. So I thought the best bet would be to upgrade it to 2.1, even if it was still in beta.

Running the upgrade script I get to here:

Executing: "Adding support for alerts" (11 of 57)

And then the upgrade stops with this error:

Incorrect date value: '0000-00-00' for column 'birthdate' at row 50

Any help with this would be appreciated.


Title: Re: Attempting Upgrade to 2.1, Error in upgrade script
Post by: Kindred on June 16, 2017, 06:13:45 AM
well, SMF 2.0.14 should run just fine on that configuration...
Title: Re: Attempting Upgrade to 2.1, Error in upgrade script
Post by: Daryn on June 16, 2017, 10:10:58 AM
Quote from: Kindred on June 16, 2017, 06:13:45 AM
well, SMF 2.0.14 should run just fine on that configuration...

In this case, it doesn't seem to. All I get is a white screen. I'd have to look back into the logs again to pull the specific error it gave me, but it was clearly unhappy with me.
Title: Re: Attempting Upgrade to 2.1, Error in upgrade script
Post by: Daryn on June 16, 2017, 01:31:00 PM
From what I've read though, it seems like MySQL 5.7 doesn't like 0000-00-00 as a date. You'd have to use either an arbitrary date like 1970-01-01 or null.
Title: Re: Attempting Upgrade to 2.1, Error in upgrade script
Post by: vbgamer45 on June 16, 2017, 01:33:22 PM
Issue reported https://github.com/SimpleMachines/SMF2.1/issues/4136
Title: Re: Attempting Upgrade to 2.1, Error in upgrade script
Post by: Oldiesmann on June 16, 2017, 02:17:45 PM
Run this query in phpMyAdmin, replacing "smf_" with your DB prefix if necessary:

UPDATE smf_members SET birthdate='1000-01-01' WHERE birthdate='0000-00-00';

The minimum permitted value for DATE columns in MySQL has changed some over the years, so that should fix the issue for you.