Jump to content

Fix Database when Updating


Go to solution Solved by bryanharley,

Recommended Posts

I'm trying to update to the latest software version, but it keeps telling me I need to fix my database by running these queries:

UPDATE `ibf_core_output_cache` SET `cache_expire`=0 WHERE `cache_expire` IS NULL;
ALTER TABLE `ibf_core_output_cache` DROP INDEX `cache_expire`, CHANGE COLUMN `cache_expire` `cache_expire` INT NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the cache expires', ADD KEY `cache_expire` (`cache_expire`);

I tried running the queries manually. But when I click "Check Again" it just displays the same message. I tried clicking "Fix Automatically", but that doesn't work either. Still displays that message.  How can I get past this?

Edited by bryanharley
Link to comment
Share on other sites

  • 6 months later...

Hi Marc,

I have the same issue

If You leave php 7.4 You cannot upgrade

if You switch to php 8 allways the same error message: UPDATE `core_output_cache` SET `cache_expire`=0 WHERE `cache_expire` IS NULL;
ALTER TABLE `core_output_cache` DROP INDEX `cache_expire`, CHANGE COLUMN `cache_expire` `cache_expire` INT NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the cache expires', ADD KEY `cache_expire` (`cache_expire`);

Link to comment
Share on other sites

Hello @Marc Stridgen

I'm currently running PHP 8.0, MySQL 8.0 and when attempting to upgrade my forum to 4.7.10, I get a similar error as described above, first hitting this message:

Could contain: File, Page, Text, Webpage

When I click "Fix this" I get a giant list of SQL queries to run, which I did try to run in pieces manually in myPHP admin (the automatic fix didn't work).

Could contain: Page, Text

We tried upgrading the database tables from utf8 mb3 to mb4 which seemed to remove the warnings seen when trying to the run the scripts, but coming back to the upgrader we still hit this error.

This is a self hosted forum.  URL is https://forum.nhl94.com/ and the details should be stored in my client area info. Any ideas?

Thanks,

-Evan

Link to comment
Share on other sites

Thanks @Marc Stridgen

I have uploaded a new set of files and ran the upgrader from /admin/upgrade and I'm stuck on a different but similar error where I run the SQL commands manually and click "I have run..." but it's stuck on this screen:

Could contain: File, Webpage, Page, Text

Running this as is gave me warnings about utf8 being depreciated and should use utf8mb4, so I tried changing the last statement to use uft8mb4 which then ran without warnings but still can't get past this screen.

Here's the updated statement I ran without error:

ALTER TABLE `ibf_forums_posts` CHANGE COLUMN `author_name` `author_name` VARCHAR (255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL , DROP INDEX `ip_address`, CHANGE COLUMN `ip_address` `ip_address` VARCHAR (46) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' , ADD KEY `ip_address` (`ip_address`), CHANGE COLUMN `post` `post` MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL , CHANGE COLUMN `edit_name` `edit_name` VARCHAR (255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL , DROP INDEX `post_key`, CHANGE COLUMN `post_key` `post_key` VARCHAR (32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' , ADD KEY `post_key` (`post_key`), CHANGE COLUMN `post_edit_reason` `post_edit_reason` VARCHAR (255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' , CHANGE COLUMN `post_field_t1` `post_field_t1` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL , CHANGE COLUMN `post_field_t2` `post_field_t2` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL ;

Any other ideas?

Thanks!

-Evan

Link to comment
Share on other sites

Depending on a version, there was an issue where the database check was indeed coming up false. However, keep in mind the original issue the OP had was different. 

If your queries there won't go away from the Support or upgrade screen and you're on 4.6, that is likely the error and a manual upgrade is required.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...