I have run into this problem on two of my websites that run Civicrm separately. Both are running version 4.5.8. When I run the automatic installer, the update process seems to freeze for an infinite amount of time and quits updating the database and all of the core files. With one of my sites, I was able to make a backup of the database prior to the error and reverted back to version 4.5.8, however, I wasnt able to make a backup of the other and now I am unable to update Civicrm at all, and it gives random errors when running certain tasks. I also am presented with the following error: "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again."

What can I do to fix my database so that I can be able to update CiviCRM in the future or is there a way to bypass the database check and have it update CiviCRM without further error?

2 Answers 2


This is a tricky one to resolve yourself. You basically need to identify whereabouts in the upgrade it failed. For example it might have done all the tasks for a particular point version & failed afterwards, or it might have run some sql & not completed.

If you look in the db the civicrm_domain table has a field called version. Once you know where it got to you can go through the sql statements in that version's upgrade & figure out which ones it did & didn't complete - eg.


There are also php functions so you need to evaluate those too https://github.com/fuzionnz/civicrm-core/tree/4.6/CRM/Upgrade/Incremental/php

Once you know where it fell over you can evaluate what needs to be applied to get it to the next point version. Once you have done all the things the upgrade script would have done to get to the next point version you can alter the value in civicrm_domain.version to the next point version & remove the upgrade & then start the script running again

  • +1 this is an old answer but still works perfectly well - thanks! Commented Aug 25, 2020 at 18:54

You can effectively reset the database structure by following the "Ensuring Schema Integrity" steps. Instructions are at http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades

This may cure the problems you're experiencing, or it may (via error messages!) illustrate where the database is no longer conforming.

  • This link is now dead, and I can't find the new location...
    – thoni56
    Commented May 27, 2021 at 15:00
  • Have this problem updating Civi to 5.50.3 (and 5.51.beta1). Failure version in database is at 5.48.alpha1.upgrade. This after doing a manual install of Extended Report Possibly related?
    – Dave T
    Commented Jun 27, 2022 at 18:04
  • It could be related. You can try disabling the extension before the upgrade and see what happens. You can also settle for a partial upgrade ... go to v 5.47, make a new set of backups there, flush all the caches, possibly upgrade the extensions and then try again. Commented Jun 28, 2022 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.