Title: Database Update Unexpected Error
Last modified: February 10, 2023

---

# Database Update Unexpected Error

 *  Resolved [marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/)
 * (@marekstandandstretch)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/)
 * Hey GiveWP Support Team!
 * One of our clients is having issues with their database updating.
 * I’ve followed the following steps here: [https://givewp.com/documentation/core/frequent-troubleshooting-issues/handling-database-update-issues/](https://givewp.com/documentation/core/frequent-troubleshooting-issues/handling-database-update-issues/)
   
   and here: [https://wordpress.org/support/topic/unexpected-issue-occurred-during-the-database-update/](https://wordpress.org/support/topic/unexpected-issue-occurred-during-the-database-update/)
   But unfortunately the issue is not resolved.
 * Steps I’ve taken:
   – cleared site cache and disabled all plugins besides GiveWP
   and tried to update database– enabled advanced updates and updated each entry
   individually, cleared plugin cache (site cache disabled) and tried to run the
   updater again, same issue. – All themes, wp core, plugins are up to date– Looked
   for the donation ID in the log but the log contains no entries with the log id(#
   1936) so I cant remove or edit the donation in question.
 * Here are the general log entries:
 *     ```wp-block-code
       Error
   
       Core
   
       Revenue Migration
   
       2023-02-10 02:35:34
   
       An error occurred inserting data into the revenue table
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:35:34
   
       Update Pause
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:35:34
   
       Update Health Check
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:35:34
   
       Update Health Check
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:35:34
   
       Update Restart
   
       Error
   
       Core
   
       Revenue Migration
   
       2023-02-10 02:31:36
   
       An error occurred inserting data into the revenue table
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:31:36
   
       Update Pause
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:31:36
   
       Update Health Check
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:31:36
   
       Update Health Check
   
       Error
   
       Migration
   
       Give Core
   
       2023-02-10 02:31:36
   
       Update Restart
       ```
   
 * Here is detail from the first entry:
 * {
   “Data”: {“donation_id”: 1936,“form_id”: 0,“amount”: 0},“Error”: “An error occurred
   when processing Donation #1936. To insert revenue, please provide valid donation_id,
   form_id, amount.”}
 * And the second entry:
 * {
   “post_title”: “Update Pause”,“post_content”: “stdClass Object\n(\n [key] =>
   wp_give_db_updater_batch_81d68a5200b87e128f6991361c909d9a\n [data] => Array\n(\
   n [0] => Array\n (\n [id] => add-past-donation-data-to-revenue-table\n [version]
   => 2.9.0\n [callback] => Array\n (\n [0] => Give\Revenue\Migrations\AddPastDonationsToRevenueTable
   Object\n (\n )\n\n [1] => run\n )\n\n [type] => database\n )\n\n [1] => Array\
   n (\n [id] => migrate_existing_logs\n [version] => 2.10.0\n [callback] => Array\
   n (\n [0] => Give\Log\Migrations\MigrateExistingLogs Object\n (\n [logTypeHelper:
   Give\Log\Migrations\MigrateExistingLogs:private] => Give\Log\Helpers\LogTypeHelper
   Object\n (\n )\n\n [legacyLogsTable:Give\Log\Migrations\MigrateExistingLogs:private]
   => Give\Log\Helpers\LegacyLogsTable Object\n (\n )\n\n )\n\n [1] => run\n )\n\
   n [type] => database\n )\n\n )\n\n)\n”,“post_parent”: 0,“log_type”: “update”,“
   file”: “/home/341820.cloudwaysapps.com/ctmbdyzgqt/public_html/wp-content/plugins/
   give/includes/admin/upgrades/class-give-updates.php”,“line”: 360,“function”: “
   add”,“class”: “Give_Logging”}
 * I would appreciate any help you could give!
 * Best,
   Marek
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-update-unexpected-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/)
 * (@marekstandandstretch)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16467793)
 * [@matheusfd](https://wordpress.org/support/users/matheusfd/) [@stephanieliy](https://wordpress.org/support/users/stephanieliy/)
   [@dlocc](https://wordpress.org/support/users/dlocc/) any thoughts?
 *  Thread Starter [marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/)
 * (@marekstandandstretch)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16467835)
 * FYI, the error is related to a donation that doesn’t exist in the logs. If I 
   could find and remove it that may resolve the issue. Please note that I also 
   tried to install and use the givewp database health-check plugin without success.
 * ![](https://i0.wp.com/i.imgur.com/rTg8abo.png?ssl=1)
 *  [stephanieliy](https://wordpress.org/support/users/stephanieliy/)
 * (@stephanieliy)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16474349)
 * Hi [@marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/),
   
   Glad you reached out, it looks like you are taking all the right steps, but we
   need to find that donation that is throwing a monkey wrench into everything.Let’s
   start by having you switch from the New View in Donations > Donations to the 
   Legacy view. Then, give that a search and see if the offending donation shows
   up.If you don’t find it there, I’d recommend using the SQL Buddy plugin to search
   for that donation in your database tables. Before doing this, I highly recommend
   taking a good backup of the site that you can confidently restore from. Donations
   come into your site as “posts” so you can search the wp_posts table for that 
   donation number.Give this a look and let me know how things go. I’m happy to 
   help with any questions along the way!
 *  [stephanieliy](https://wordpress.org/support/users/stephanieliy/)
 * (@stephanieliy)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16474351)
 * Hi [@marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/),
   
   Glad you reached out, it looks like you are taking all the right steps, but we
   need to find that donation that is throwing a monkey wrench into everything.
 * Let’s start by having you switch from the New View in Donations > Donations to
   the Legacy view. Then, give that a search and see if the offending donation shows
   up.
 * If you don’t find it there, I’d recommend using the [SQL Buddy plugin](https://wordpress.org/plugins/sql-buddy/)
   to search for that donation in your database tables. **Before doing this, I highly
   recommend taking a good backup of the site that you can confidently restore from.**
   Donations come into your site as “posts” so you can search the wp_posts table
   for that donation number.
 * Give this a look and let me know how things go. I’m happy to help with any questions
   along the way!
 *  Thread Starter [marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/)
 * (@marekstandandstretch)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16475193)
 * Hey [@stephanieliy](https://wordpress.org/support/users/stephanieliy/),
 * Thanks for getting back to me. Legacy view allowed me to find and remove the 
   culprit. A subsequent database update resolved the issue. Thanks for the assist!
 * Best,
   Marek

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Database Update Unexpected Error’ is closed to new replies.

 * ![](https://ps.w.org/give/assets/icon-256x256.jpg?rev=2873287)
 * [GiveWP - Donation Plugin and Fundraising Platform](https://wordpress.org/plugins/give/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/give/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/give/)
 * [Active Topics](https://wordpress.org/support/plugin/give/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/give/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/give/reviews/)

## Tags

 * [database update](https://wordpress.org/support/topic-tag/database-update/)
 * [Unexpected error](https://wordpress.org/support/topic-tag/unexpected-error/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * 5 replies
 * 2 participants
 * Last reply from: [marekstandandstretch](https://wordpress.org/support/users/marekstandandstretch/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/database-update-unexpected-error/#post-16475193)
 * Status: resolved