Title: Database update issue
Last modified: June 1, 2021

---

# Database update issue

 *  Resolved [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/)
 * Hello, I am having trouble with the database update, as it remains stuck as 0%.
   I have tried the solutions provided in your documentation, including deactivating
   all plugins and also running the Advanced Database Updates in the Settings section.
   Do you have any other ideas on how to resolve this issue? Thank you very much!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-update-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Ben Meredith](https://wordpress.org/support/users/benmeredithgmailcom/)
 * (@benmeredithgmailcom)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14521677)
 * Hi [@alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * Usually when the database update hangs, the error is logged in the logs at Donations
   > Tools > Logs. Check those logs for clues.
 * The most common cause for those updates to stall is if donations have become 
   unattached from their donation forms. We’ve seen this happen to some folks, and
   the only fix is to maunally go through the donations list and select the donation
   and reattach it to the donation form, and save it.
 * ​​Let me know if that resolves things, or if you need further assistance. ​Thanks
   for using GiveWP! Have a great day.
 *  Thread Starter [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14522721)
 * Hello, thank you so much for your reply!
 * I have added the forms and donors to the donations and have restarted the updates,
   but unfortunately to no effect.
 * There are many errors in the Log section, most of them stating ‘Update Health
   Check’, ‘Update Restart’, ‘Update Pause’ or ‘Update Error’ in the description.
 * Your further assistance on this matter is greatly appreciated.
 * Thank you!
 *  Plugin Contributor [Ben Meredith](https://wordpress.org/support/users/benmeredithgmailcom/)
 * (@benmeredithgmailcom)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14529143)
 * Hey [@alex_stoiu](https://wordpress.org/support/users/alex_stoiu/) focusing on
   the most recent one that reads “Update Error” what does the full text of the 
   error say?
 * Note that ALL donations have to be attached to a form, not just the one in the
   error message.
 *  Thread Starter [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14529247)
 * Hello again Ben and thanks again for the reply!
 * Please note that all donations are linked to the donation form.
 * Here are the details of the Update Error:
 * Log ID: 160
    Description: Update Error Category: Migration Source: Give Core 
   Date & Time: 2021-06-05 09:20:00 Error details: post_title:Update Error post_content:
   Update Task Total update count: 0 Update IDs: Array ( ) Update: Array ( [update_info]
   => Array ( [id] => migrate_existing_logs [version] => 2.10.0 [callback] => Array([
   0] => Give\Log\Migrations\MigrateExistingLogs Object ( [logTypeHelper:Give\Log\
   Migrations\MigrateExistingLogs:private] => Give\Log\Helpers\LogTypeHelper Object()
 *  [legacyLogsTable:Give\Log\Migrations\MigrateExistingLogs:private] => Give\Log\
   Helpers\LegacyLogsTable Object
    ( )
 *  )
 *  [1] => run
    )
 *  [type] => database
    )
 *  [step] => 2739014
    [update] => 1 [heading] => Update 1 of 2 [percentage] => 
   0 [total_percentage] => 0 ) post_parent:0 log_type:update file:/home/u178467373/
   domains/tarkovskiana.ro/public_html/wp-content/plugins/give/includes/class-give-
   background-updater.php line:365 function:add class:Give_Logging
 *  Plugin Contributor [Ben Meredith](https://wordpress.org/support/users/benmeredithgmailcom/)
 * (@benmeredithgmailcom)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14529313)
 * Ah, this is now an issue of the logs not migrating correctly.
 * Here’s a long-winded explanation:
 * We overhauled the logging system in GiveWP in version 2.10.x to make it much 
   more easy to manage logs in the application. A part of that overhaul was taking
   the existing logs (in a table named wp_give_logs) and moving them to a new table
   that was structured in a way that is more performant. The new table is named 
   wp_give_log (no s on the end). The order of events was the following:
 * 1. create the new log table. (this happens silently upon update to 2.10.x)
    2.
   migrate the logs from the old logs table to the new log table (this happens as
   a result of clicking the button to run the updates) 3. delete the old an no longer
   needed logs table. (this happens at the end of step 2, automatically)
 * Somehow on their site the logs table was deleted before the migration in step
   2 happened, and GiveWP doesn’t know how to fix that, so it just kinda fails with
   a logged failure.
 * Manually adding back in the logs table and then running the migration fixes the
   problem.
 * I’ve linked to a SQL file here with that dummy log in it, for you to attempt 
   the same on your side: [https://drive.google.com/file/d/16GSitC3f1XacGTxk_YM1WOfU0U4WIZ-N/view?usp=sharing](https://drive.google.com/file/d/16GSitC3f1XacGTxk_YM1WOfU0U4WIZ-N/view?usp=sharing)
   Your host should be able to help with manually adding in that missing table from
   this SQL file:
 * Let me know if that resolves things, or if you need further assistance. Thanks
   for using GiveWP! Have a great day.
 *  Thread Starter [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14532405)
 * Thank you again for your replies and help in solving this issue.
 * Unfortunately I am not very familiar with SQL and don’t know how to go about 
   the instructions you provided.
 * Could you please provide detailed (step by step) instructions on how to apply
   your solution? Do I just paste and run that sql code in phpmyadmin?
 * Thank you!
 *  Thread Starter [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14540531)
 * Hi again,
 * I have contacted my host in regards to this, have created the new table, but 
   before manually migrating the logs, the support agent wanted to know the following
   information:
 *     ```
       Perhaps you could clarify with the plugin's creator on the table sections? At the moment, your old table has id, log_type, data, category, source and date:
   
       While the new one has id, log_title, log_content, log_parent, log_type, log_date, log_date_gtm:
   
       I would not want you to lose any data, therefore, could you ask him whether you will need to insert additional information to the rest of the fields or can they be replaced by the same ones you had in the old table?
       ```
   
 * Awaiting for your reply.
 * Thank you very much!
 *  Plugin Support [Rick Alday](https://wordpress.org/support/users/mrdaro/)
 * (@mrdaro)
 * [5 years ago](https://wordpress.org/support/topic/database-update-issue/#post-14546697)
 * Hi [@alex_stoiu](https://wordpress.org/support/users/alex_stoiu/),
 * There’s no need to add sections to the old logs table. The migration will take
   care of mapping the data to the new table correctly.
 *  Thread Starter [alex_stoiu](https://wordpress.org/support/users/alex_stoiu/)
 * (@alex_stoiu)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/database-update-issue/#post-14553150)
 * Thank you all so much for your replies and support!
 *  Plugin Support [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * (@matheusfd)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/database-update-issue/#post-14559692)
 * Hey [@alex_stoiu](https://wordpress.org/support/users/alex_stoiu/),
 * We are always happy to help you.
 * We’d love to get a public review about what you think of GiveWP both from a product
   standpoint as well as how it is to deal with our team. Here are some options:
 * WordPress: [https://wordpress.org/support/view/plugin-reviews/give](https://wordpress.org/support/view/plugin-reviews/give)
   
   Google: [https://g.page/givewp/review?rc](https://g.page/givewp/review?rc) Facebook:
   [https://www.facebook.com/pg/wpgive/reviews/](https://www.facebook.com/pg/wpgive/reviews/)
 * The reviews help others to decide if it’s worth doing business with us!
 * Have a great day!

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

The topic ‘Database update issue’ 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](https://wordpress.org/support/topic-tag/database/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * 10 replies
 * 4 participants
 * Last reply from: [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * Last activity: [4 years, 12 months ago](https://wordpress.org/support/topic/database-update-issue/#post-14559692)
 * Status: resolved