Upgrade 1.5 to 3.1.2

I’m upgrading an install of Omeka 1.5 to Omeka Classic 3.1.2. When I run the database upgrade script, it throws errors. Looking at the database, I have two tables associated with two plugins that have html code as content. If I upgrade a copy of the database without the plugin content, it upgrades fine. Any ideas on how I should proceed? The plugins are Exhibit Builder and Simple Pages.

What are the errors you’re getting?

I tried two different approaches. First I tried upgrading the 1.5 install directly to 3.1.2. I received an error when I was instructed to upgrade that the Omeka_Record was not found in simple_pages_pages. So I tried upgrading to version 2.0, which gave the same error. After posting on the forum, I tried to replicate the error but I received a different error now.
“PHP Fatal error: Class ‘Omeka_Record’ not found in /var/www/html/omeka2/plugins/Geolocation/models/Location.php”

You have to upgrade the plugins also when upgrading from these very old versions. Having old 1.x plugins in place on 2.x or 3.x versions of Omeka Classic will cause this kind of problem.

You can either replace the plugins with the upgraded versions at the same time as you put in the upgraded core files, or you can just not move them over and have only the 3 plugins that are already in the plugins folder in the 3.1.2 zip, then put other upgraded plugins in place after doing the core upgrade.

Ok, I’ll try it. Thank you.

I did as was instructed and received the following error:

Omeka encountered an error when upgrading your installation.

SQL error in migration: Mysqli statement execute error : Unknown column ‘record_name’ in ‘omeka_search_texts’

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Unknown column ‘record_name’ in ‘omeka_search_texts’ in /var/www/html/omeka/application/libraries/Zend/Db/Statement/Mysqli.php:215 Stack trace: #0 /var/www/html/omeka/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute() #1 /var/www/html/omeka/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute() #2 /var/www/html/omeka/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query() #3 /var/www/html/omeka/application/migrations/20120813000000_changeToRecordType.php(22): Omeka_Db->__call() #4 /var/www/html/omeka/application/libraries/Omeka/Db/Migration/Manager.php(232): changeToRecordType->up() #5 /var/www/html/omeka/application/libraries/Omeka/Db/Migration/Manager.php(111): Omeka_Db_Migration_Manager->_migrateUp() #6 /var/www/html/omeka/application/controllers/UpgradeController.php(46): Omeka_Db_Migration_Manager->migrate() #7 /var/www/html/omeka/application/libraries/Zend/Controller/Action.php(516): UpgradeController->migrateAction() #8 /var/www/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch() #9 /var/www/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch() #10 /var/www/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch() #11 /var/www/html/omeka/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #12 /var/www/html/omeka/application/libraries/Omeka/Application.php(73): Zend_Application->run() #13 /var/www/html/omeka/admin/index.php(28): Omeka_Application->run() #14 {main}

(I’m upgrading/migrating Omeka 1.5 in FreeBSD 8.x to Omeka 3.1.2 in Debian 12.)

Make sure you’re starting with the as-is database from the 1.x version. This looks kind of like you had a previous partial upgrade done and you have the tables from that still sitting in your database. If you have a search_texts table, taking this specific example, that’s something added by the upgrade, so it shouldn’t be there in your 1.x database.

Hmmm… Actually, this is a copy of the running database. It looks like there were various upgrades/migrations between 2010 and 2012. Any suggestions on how to fix this without the previous “good” database?

So this specific problem you could resolve by dropping the search_texts table. It’s not part of the 1.x install, and an upgrade starting at 1.5 will create it for you.

The one thing to clarify is that you should really “start over” if you have a problem with the upgrade like this, so in this case, restore the database from before your upgrade attempt, then drop search_texts, then do the upgrade again. It’s possible to try to make a fix “in the middle” and just keep going on the upgrade but it’s best avoided if you don’t have to do it.

Alright, thank you for the help. I appreciate it.