News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

upgrading error stuck

Started by rghetti, February 04, 2024, 06:06:32 PM

Previous topic - Next topic

rghetti

Hey Guys,
long time user, upgrading my board and getting an error
not sure what to make of it or if I can fix it ?

.........
Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made.
Executing: "Adding support for start and end times on calendar events" (56 of 71)
Error!
Invalid default value for 'eventDate'

stuck at 72%

thanks for any thoughts.
-Ron



Kindred

upgrading from which version?
Mods which were previously installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rghetti

from 2.0.19 to 2.1.14
no mods that I can recall, a long time ago there was
the google map mod and an image gallery mod but I think those were dropped
a few years ago on regular upgrades.

thanks


Kustomuk

I got a upgrade error like this and it was because i was upgrading from firefox and not Microsoft edge could be this if you was trying to upgrade from a different browser.

 :)

Kindred

No. This has absolutely nothing to do with browser
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rghetti

agreed, not a browser issue.
bad data it appears.
I'm not sure where to find a log that might tell me more.
if it is a bad field to clear or delete it etc.

hopefully someone can shed some light, I've read through the forums but haven't found
anything quite like this.

thanks for any comments.



Doug Heffernan

Quote from: rghetti on February 04, 2024, 06:06:32 PMExecuting: "Adding support for start and end times on calendar events" (56 of 71)
Error!
Invalid default value for 'eventDate'

eventDate is not a default field of the smf_calendar_holidays table. In Smf 2.0.x and 2.1.x that field is called: event_date. In your case it must have been added either by a third party mod or it's a 1.1.x version field.

Can you make a screenshot of the smf_calendar_holidays table 's structure and post it here?

Sir Osis of Liver

You can find the field by running this query -


SELECT table_name,table_schema
FROM INFORMATION_SCHEMA.COLUMNS
WHERE column_name='eventDate'

When in Emor, do as the Snamors.
                              - D. Lister

rghetti

yes, that is helpful.
the board wont run at this point.

smf_calendar seems to be part of the system so must've been added as Doug said.
thanks Doug, much appreciated.



rghetti

holiday table info


Quote from: Doug Heffernan on February 05, 2024, 11:42:44 AM
Quote from: rghetti on February 04, 2024, 06:06:32 PMExecuting: "Adding support for start and end times on calendar events" (56 of 71)
Error!
Invalid default value for 'eventDate'

eventDate is not a default field of the smf_calendar_holidays table. In Smf 2.0.x and 2.1.x that field is called: event_date. In your case it must have been added either by a third party mod or it's a 1.1.x version field.

Can you make a screenshot of the smf_calendar_holidays table 's structure and post it here?

Quote from: Doug Heffernan on February 05, 2024, 11:42:44 AM
Quote from: rghetti on February 04, 2024, 06:06:32 PMExecuting: "Adding support for start and end times on calendar events" (56 of 71)
Error!
Invalid default value for 'eventDate'

eventDate is not a default field of the smf_calendar_holidays table. In Smf 2.0.x and 2.1.x that field is called: event_date. In your case it must have been added either by a third party mod or it's a 1.1.x version field.

Can you make a screenshot of the smf_calendar_holidays table 's structure and post it here?

Sir Osis of Liver

Your calendar_holidays table does not contain the offending column, only the three default columns.  You must run the query I posted above to find eventDate, which, as Doug posted, is not a valid column in 2.1 core.
When in Emor, do as the Snamors.
                              - D. Lister

rghetti

 yes, my reply number #8 shows the query result

  smf_calendar  and backup smf_calendar

the board goes way back to at least 2009 possibly 2003-2004
would any of the upgrades remove the field / table ?

do you think that is the solution?  I'm not a db admin
just picking things up from reading about it.

thanks again for your thoughts / comments.  much appreciated.


Arantor

I wonder.

If you go to the smf_settings table and look for an entry called smfVersion what do you find?

I'm wondering if it's thinking it's trying to do a partial conversion from 1.1 to 2.0 (which would explain the event_date issue because the old default date 0000-00-00 00:00:00 is no longer permitted by default)
Holder of controversial views, all of which my own.


rghetti

smfVersion 2.1 dev0 in the backup table.

in phpadmin I don't see the regular tables only the backup table/database.
I found that if I delete/drop the smf_calendar from the database and run the upgrade file again
it gives the same error.
when the upgrade starts it makes a backup, is it just a text export to disk, can it be edited to remove
the offending default eventdate  ?

is there an ignore errors switch for the upgrade ?

thanks

Doug Heffernan

Quote from: rghetti on February 06, 2024, 12:29:15 PMI found that if I delete/drop the smf_calendar from the database

You shouldn't drop default tables from the database. Doing that will result in errors.

Quote from: rghetti on February 06, 2024, 12:29:15 PMsmfVersion 2.1 dev0 in the backup table.

This is very strange. The tables with the backup prefix are usually made by the upgrader before it's run if the backup option is selected beforehand. You are saying that you are trying to upgrade from 2.0.19 to 2.1.14, but it looks like this might not be the case.

Can you try the following and post back the result?

Quote from: Sir Osis of Liver on February 05, 2024, 12:01:38 PMYou can find the field by running this query -


SELECT table_name,table_schema
FROM INFORMATION_SCHEMA.COLUMNS
WHERE column_name='eventDate'




Kindred

From your description,  it sounds like you THINK that you are working with one database while the system is actually using a different one
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rghetti

Doug, the attachment on post number 8 shows the result, not sure why you aren't seeing that.
it returns the name of the table smf_calendar and the backup table backup_smf_calendar.
same thing, evidently the update makes a set of backup tables as part of the routine and yes I did check the box that says make a backup of everything.

here is the link.
https://www.simplemachines.org/community/index.php?action=dlattach;attach=290625


as far as different databases go, perhaps but that isn't making a whole lot of sense to me.
is the specific database listed in the settings file ?
my settings.php file shows this lime which matches the database name in phpadmin

ok, looks like I'm making some progress, there are 2 copies of the database,
you are right about that, I had to scroll further down to see the second set of tables, I deleted the contents of the calendar table and it is now progressing through the updgrade.
fingers crossed and thank you for your help, sometimes another set of eyes or ears helps.

-R





Kindred

you should never do direct database edits like deleting the contents or removing a table without knowing EXACTLY what you are doing.  Things in the SMF database are interconnected, and events which are associated with posts will now be broken posts.

Instead of just deleting things, you SHOULD have looked at why your database had a different name for the column...   did a mod add that? was it not converted when you did an earlier upgrade?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rghetti

yes Thanks, I'm aware and the contents of the table was from 2006-2008
only a few records that I recalled were from many years ago.

I cleared the contents of the table and adjusted the default date to
something more reasonable than 0000-00-00

the upgrade was able to continue without a hitch after that.
I believe it was either an old mod or from the 1.x version
it is all set thankfully.
much appreciated guys!
-R

Doug Heffernan

Glad to see that you got your forum upgraded successfully. Marking this as solved.

Advertisement: