I'm attempting to upgrade our Omeka installation to 2.1.2. from 1.3. I backed up the installation locally and started off with a fresh 2.1.2 installation unzipped on the server (old installation had been deleted from the server).
Initially I ran into the same issues described here: http://omeka.org/forums/topic/upgrade-111-to-2x-error-mysqli-prepare-error-table-omekatestomeka_sessions
Followed the fix and made it to the prompt to upgrade. After hitting the big green button to Upgrade Database, I was redirected to /admin/upgrade/migrate--which only displayed the text from the public view (Public site is unavailable until the upgrade completes.).
Now seeing this error at admin/upgrade:
Notice: Undefined variable: success in
admin/themes/default/upgrade/migrate.php on line 31
Omeka encountered an error when upgrading your installation.
SQL error in migration: Mysqli statement execute error : Duplicate column name 'record_type'
I've tried restoring the DB and attempting the upgrade again with no luck, and have tried installing 2.1.2 fresh and hit the same snags in the process. Does anyone have any ideas? What other information would be helpful to try to pinpoint the problem?
The sessions bug is a known issue, and we've actually fixed it. The fix will appear in the next version of Omeka.
The migration error, on the other hand, is a new one. When you say you "hit the same snags" when installing 2.1.2 fresh, are you including that migration error? That wouldn't really make sense, because migrations don't get run on a fresh install.
In your original, 1.3 copy of the database, do you have a
record_type column in the
search_texts tables (you actually shouldn't have a
search_texts table at all)?
Here's the process I stepped through both times: I installed 2.1.2 to our Omeka subdomain--I'd moved the old installation out of the way first. I renamed and moved files from the old installation and created a new db.ini file pointing to our database. The db is the same one we've been using and I restored it to 1.3 after hitting the upgrade error each time--and I did get the sessions bug both times.
I hope that clarifies what I meant when I said 'fresh installation' and gives you a better idea of what I ran into.
element_sets contains record_type_id, but no record_type.
element_texts DOES contain record_type (AND record_type_id
And luckily there is no seach_texts.
That's strange. The
element_texts table installed with Omeka 1.3 doesn't contain a
Is there any data in that column? Even if there is, it's likely to just be essentially a copy of the same data expressed by
record_type_id (the column you should have).
Since you have a backup to fall back on, the way to go may be to just drop the extraneous
record_type column before attempting the upgrade.
There was data in the column--and different data that didn't sync up with
I dropped the column and tried again. Again, redirected to /admin/upgrade/migrate--which only displayed the text from the public view (Public site is unavailable until the upgrade completes.)
Looking back at /admin brought me back to an upgrade button, and then the same error.
I'm still having a little trouble understanding the exact problem you're describing.
You can get to
admin/upgrade, but when you click the button and are sent to
admin/upgrade/migrate, you just have the white screen with text "Public site..."?
How are you actually getting the upgrade to happen, then?
And, when you say you got the same error, do you mean the "Public site is unavailable" one, or the "Omeka encountered an error" one?
Your troubles with getting the upgrade button itself to work seem unrelated to the actual database error you reported, but they're puzzling. You should never see that "Public site..." message on a URL starting with
Gotcha! Sorry, it's been a no-coffee Monday so far.
If I ever go back to
/admin, it does still show the upgrade option. Any second attempt results in the error.
Could it be an issue with database size? Could the "Public site..." message be a sign that something has timed out?
Does it take a while before showing the message about "Public site is unavailable"?
Timeouts are possible, but they're unlikely to result in behavior like this, and a timeout would take a while and be pretty noticeable.
I apologize, but I'm still a little confused as to the flow between the pages you're describing when you try to upgrade. It should work like this:
/admin, which redirects you to:
/admin/upgrade, which has the "Upgrade Database" button. Clicking that button takes you to:
/admin/upgrade/migrate, which shows the status of the upgrade, whether it succeeded or failed.
So, what I think you're saying that you always get the white-screen "Public site" message the first time you click the button, and the URL you get taken to is
The, you go back to
/admin/upgrade, click the button again, and you get taken back to
/admin/upgrade/migrate, but this time there's an "Omeka encountered an error when upgrading your installation" message.
Is this right? Or are there any other steps, or any URLs I didn't list that appear at some point in the process?
Oh, and a final detail to check up on. You said that any second attempt results in the error. By that, you mean the same "Duplicate column name 'record_type'" error that you described in your first post? Or, does it change at all? I'd have expected a different error to occur, or none at all, after you removed the
record_type column from your re-imported copy of the 1.3 database.
Sorry for the barrage of questions, but this is a somewhat strange situation.
That's exactly the process--thank you for taking the time to clarify. It's definitely a strange series of issues to run into.
It does takes several minutes for the white page with "Public site is unavailable" to appear.
The, you go back to /admin or /admin/upgrade, click the button again, and you get taken back to /admin/upgrade/migrate, but this time there's an "Omeka encountered an error when upgrading your installation" message.
Comes this error:
"Duplicate column name 'record_type'". That hasn't changed at all, even after removing the
record_type column from the re-imported 1.3 database.
Don't worry at all about the barrage of questions! Feel free to ask away anywhere you'd like more clarification. I can also pull together screenshots or clips where it would be helpful for you. Thank you for helping puzzle through this.
Hmm, that does sound somewhat like a timeout or something similar may be at play here. Do you have a particularly large site?
Something you might try is a staggered upgrade: trying an upgrade to 1.5.3, and then to the latest version from there.
The backup of the DB is around 60 MB.
I tried a staggered update. I deleted everything except the files and db.ini from the installation via ftp, I renamed the files and originals folders to archive and files.
/admin and it prompted me to upgrade.
This time, no delay, I was taken to
admin/upgrade/migrate and given this error:
Omeka encountered an error when upgrading your installation.
SQL error in migration: Mysqli statement execute error : Duplicate column name 'order'
Please restore from your database backup and try again. If you have any questions please refer to Omeka documentation or post a message on the Omeka forums.
I'm about to search through the forums to see if that's something that's come up before when migrating from 1.3 to 1.5.3, but wanted to update here, as well.
I was able to find and drop the
order column causing issues in the upgrade to 1.5.3 and successfully upgrade to 1.5.3.
I then tried to jump to 2.1.2. Unfortunately, when I tried to hit the upgrade button, I got the same behavior I have been with the redirect to
admin/upgrade/migrate--it took me back to the "public site is unavailable..." page.
I went back to the 1.5.3 version of the database and attempted to jump to 2.0.1 instead. I'm getting the same behavior as the 2.1.2. attempts. It worked for a few minutes and then redirected to
admin/upgrade/migrate with the "public site is unavailable..." message.
The database behind our Omeka installation is MySQL 5 and 143.2 MB. The domain is using PHP 5.2 instead of 5.3--could that be an issue? Is there any alternative to the web interface upgrade that would help pinpoint or bypass the problem?
Let me know if there's any other information I can send your way or if there's anything I can do to clarify anything that's happening.
Thank you for your time and help!
Has anything been figured with this? We are having the same problem... Thanks!
Could you describe in more detail what exactly is happening for you? The previous report in this thread is filled with a lot of specific issues and messages, and it's unlikely that it's completely the same.
Our ultimate issue was the size of the one of the tables in our database; it was large enough that we were hitting a gateway timeout error during the upgrade; it failed when using the automatic upgrade feature or when trying to run any of the upgrade commands through phpMyAdmin (we're using Dreamhost for hosting). I ended up running upgrade commands for that table through ssl.
I haven't gotten a chance to determine if the table is larger than it should be and how it ended up causing issues, but our installation is now upgraded and working.
Thanks for the update. I'm sorry I let your issue fall off the radar, but it's good to hear you worked around the problem for now.
Thanks bbergantzel! Our problem has actually been par for par the same with all the same error messages. I have determined that our elements_text table is too large so I will have to try ssl. Thanks!
I'm having what I think is a similar problem when trying to upgrade from 1.5.1 to 2.1.4. I get this message:
SQL error in migration: Mysqli statement execute error : Unknown column 'record_name' in 'omeka_search_texts'
If I delete omeka_search_texts, I get this:
SQL error in migration: Mysqli statement execute error : Table '[database name] omeka_search_texts' doesn't exist
I don't really know what I'm doing with PHPMyAdmin, so maybe I'm not removing what I should be?
The first error looks like for some reason during the migration the column
record_name was not created when the
omeka_search_texts table was created.
So, after you deleted the table, the rest of Omeka expected it to be there, which causes the second error.
The first thing I'd try is to go back to the 1.5.1 site from your database backup and try doing the upgrade again in the hopes that it was just a fluke that the column wasn't created in the first try.
I tried going back--no problem with returning to 1.5.1 from the backup, but every time I try the upgrade, I get the same error.
Could something be wrong in the original (1.5.1) database that's only becoming a problem when I'm trying to upgrade?