Advertisement

Pre-upgrade database check issues Topic is solved

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
I-MAG
Joomla! Guru
Joomla! Guru
Posts: 989
Joined: Sat Oct 14, 2006 5:25 pm
Location: Kuwait

Pre-upgrade database check issues

Post by I-MAG » Tue Aug 06, 2024 12:43 pm

Hello,
I ran the database check to make sure all is well before I upgrade. I got this:

Code: Select all

    6 Database Problems Found.
    Other Information

    Database schema version (3.9.10-2019-07-09) does not match CMS version (3.10.7-2022-03-18).
    Table 'xyz_users' does not have index 'idx_username'. (From file 3.9.16-2020-03-04.sql.)
    Table 'xyz_template_styles' does not have column 'inheritable'. (From file 3.10.0-2020-08-10.sql.)
    Table 'xyz_template_styles' does not have column 'parent'. (From file 3.10.0-2020-08-10.sql.)
    Table 'xyz_users' does not have column 'authProvider'. (From file 3.10.7-2022-03-18.sql.)
    The Joomla! Core database tables have not been converted yet to UTF-8 Multibyte (utf8mb4).

When I click fix, I get this and the fixing process does not carry on:

Code: Select all

An error has occurred.

    1062 Duplicate entry 'Zainah' for key 'idx_username' 
My current site fuctions normally. But I'm worried these discrepencies would affect the upgrade.
Any thoughs on what to do?

Advertisement
I-MAG
Joomla! Guru
Joomla! Guru
Posts: 989
Joined: Sat Oct 14, 2006 5:25 pm
Location: Kuwait

Re: Pre-upgrade database check issues

Post by I-MAG » Sat Aug 10, 2024 6:48 pm

I went to phpmyadmin and ran repair tables, and optimise tables. That did not work.
Any idea on how can I fix this?

gsmela
Joomla! Explorer
Joomla! Explorer
Posts: 357
Joined: Thu Jun 10, 2010 12:38 pm
Contact:

Re: Pre-upgrade database check issues

Post by gsmela » Sat Aug 10, 2024 9:12 pm

Please post the Forum Post Assistant:

https://forumpostassistant.github.io/docs/

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31234
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Pre-upgrade database check issues

Post by Per Yngve Berg » Sat Aug 10, 2024 10:05 pm

Table 'xyz_users' have User 'Zainah' twice. Delete one of them. It prevents the database from making a unique index.

I-MAG
Joomla! Guru
Joomla! Guru
Posts: 989
Joined: Sat Oct 14, 2006 5:25 pm
Location: Kuwait

Re: Pre-upgrade database check issues

Post by I-MAG » Wed Aug 14, 2024 12:03 pm

Per Yngve Berg wrote: Sat Aug 10, 2024 10:05 pm Table 'xyz_users' have User 'Zainah' twice. Delete one of them. It prevents the database from making a unique index.
Many thanks. I did that. But apparenlty there are numerous users that duplicates. Not sure how that happened.
ANyway, is there a way to batch cancel duplicates? Doing that manually is tedious and time consuming.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31234
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Pre-upgrade database check issues

Post by Per Yngve Berg » Wed Aug 14, 2024 3:34 pm

Perhaps use ID From-To?

I-MAG
Joomla! Guru
Joomla! Guru
Posts: 989
Joined: Sat Oct 14, 2006 5:25 pm
Location: Kuwait

Re: Pre-upgrade database check issues

Post by I-MAG » Wed Aug 14, 2024 7:03 pm

Per Yngve Berg wrote: Wed Aug 14, 2024 3:34 pm Perhaps use ID From-To?
Thanks.
I ran this through SQL and it did the trick:

Code: Select all

SELECT username FROM #xhy5f_users GROUP BY username HAVING COUNT(*) > 1
Then I deleted the records.
PS: RFeplace XYZ with the prefix of the database.

Advertisement

Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”