I'm really sorry to hear how much you've been struggling with this upgrade.
Most often when I've seen this issue come up, it's because a step in the upgrade process has been missed, or done out of order. However, there remains the chance that something else is at play here. I'll start with some suggestions on the upgrade process:
First, if you're installing the new 2.6 site on the same server as the old one, you may want to make sure that you don't have 2 conflicting MySQL mode configuration files - remember, in the 2.6 instructions, we create one at /etc/mysql/conf.d/mysqld.cnf during the installation. The SQL modes we recommend are different between 2.5 and 2.6, so this might be a first thing to double-check. See:
Next, make sure you have your 2.5 backup saved! I'm going to recommend that you try running the tools:purge command before dropping and recreating the database - this sometimes helps. The purge command will clear out ALL user data in the database. Once the purge is complete, the task will prompt you for a site name and description, user account, etc - don't worry too much about what you enter for this stage, since it will be overwritten once we load your 2.5 database.
From AtoM's root installation directory, run:
Now, let's drop and recreate the database, to ensure we have the correct collation and character set:
- mysql -u username -p -e "DROP DATABASE IF EXISTS atom;"
- mysql -u username -p -e "CREATE DATABASE atom CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;"
One important thing to note - if you didn't call the database "atom" during installation, then remember to modify this first command!
Now you can try loading your 2.5 database, and then running the upgrade task:
- php -d memory_limit=-1 symfony tools:upgrade-sql
Don't forget to restart services, populate the search index, etc.
If that still doesn't work, then you may want to do a little investigation of your old database, and make sure there's not some data corruption that might be preventing the upgrade task from running as expected. Our Troubleshooting documentation includes some guidance on how you can check for and resolve the most common forms we've seen reported:
Let us know how it goes,