SQL error in migration 2.0.1 to 2.5


#1

Hi. I’m trying to update an installation from 2.0.1 to 2.5. MySQL is 5.6.34; PHP is 5.5.38. When I follow the prompt to update my database, I get:

SQL error in migration: Mysqli statement execute error : Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘stopped’ at row 1.
exception ‘Zend_Db_Statement_Mysqli_Exception’ with message ‘Mysqli statement execute error : Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘stopped’ at row 1’ in /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Db/Statement/Mysqli.php:214

Is this error familiar to anyone?

Thanks!


#2

This is a known error, or at least a variation on one. Can you post more of the error? (There should be more lines after the ones you posted)

You can manually remove those “zero” dates if you’re comfortable with that, or you should also be able to work around this problem by upgrading to 2.4.1 first, then from 2.4.1 to 2.5.


#3

Stack trace

#0 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE ome...')
#3 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/migrations/20151209103300_removeZeroDateDefaults.php(19): Omeka_Db->__call('query', Array)
#5 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/migrations/20151209103300_removeZeroDateDefaults.php(19): Omeka_Db->query('ALTER TABLE ome...')
#6 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Omeka/Db/Migration/Manager.php(231): removeZeroDateDefaults->up()
#7 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Omeka/Db/Migration/Manager.php(111): Omeka_Db_Migration_Manager->_migrateUp(Object(DateTime))
#8 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/controllers/UpgradeController.php(49): Omeka_Db_Migration_Manager->migrate()
#9 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Controller/Action.php(516): UpgradeController->migrateAction()
#10 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('migrateAction')
#11 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#13 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#14 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#15 /home/vfc/vermontfolklifecenter.org/digital-archive/collections/admin/index.php(28): Omeka_Application->run()
#16 {main}

I’ll try the 2.4.1 intermediate step. Thanks!


#4

Affirming that updating to 2.4.1 and then 2.5 worked. Thanks very much.


#5

Had the same trouble upgrading from 2.2.2 to 2.5. Going first to 2.4.1 then to 2.5 did the trick.

Thanks!

ksm.


#6

Hi,
I had the same issue, thanks for the solution !

DigitalOcean SiteGround