Answers.Body: <blockquote>
    <p>But on my remote server it deleted two thirds of the tables in the db.</p>
  </blockquote>
  
  <p>That sounds like some update failure happened, Craft tried to roll-back and restore the database from its pre-update attempt database backup because <a href="https://docs.craftcms.com/v2/config-settings.html#restoreDbOnUpdateFailure" rel="nofollow noreferrer">https://docs.craftcms.com/v2/config-settings.html#restoreDbOnUpdateFailure</a> is set to <code>true</code>, then <em>plot twist</em> another failure happened before it could restored and left the database in an inconsistent state.</p>
  
  <p>There are tons of reasons an update might fail to go through, and nearly as many for why a restore would fail, but a good place to start would be your <code>craft/storage/runtime/logs</code> files as well as your web server's log files.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-24T03:46:16.113Z
Answers.LastActivityDate: 2018-04-24T03:46:16.113Z
Answers.UserDisplayName: Brad Bell
Body: <p>I am on Craft 2.6.3015 and have Freeform 1.3.0 installed. I'm trying to update to the latest Freeform Lite 1.8.7 but it consistently fails. </p>
  
  <p>When I try on my local environment I just get the message:</p>
  
  <blockquote>
    <p>Craft was unable to install this update :(
    The site has been restored to the state it was in before the attempted update.
    There was a problem updating your database.</p>
  </blockquote>
  
  <p>But on my remote server it deleted two thirds of the tables in the db.</p>
  
  <p>I actually have 7 similar sites where I have done this same update no problem but this one site fails every time. I'm not sure what the difference could be.</p>
  
  <p>I wonder if I can get my hands on an intermediate version of Freeform to try updating to if that would help?</p>
  
Tags: <solspace><freeform>
Title: Freeform Lite update on Craft 2 deleted tables
ThreadText: # Freeform Lite update on Craft 2 deleted tables
  
  (Asked by: username_0 on 2018-04-20)
  
  I am on Craft 2.6.3015 and have Freeform 1.3.0 installed. I'm trying to update to the latest Freeform Lite 1.8.7 but it consistently fails.
  
  When I try on my local environment I just get the message:
  
  > Craft was unable to install this update :(
  > The site has been restored to the state it was in before the attempted update.
  > There was a problem updating your database.
  
  But on my remote server it deleted two thirds of the tables in the db.
  
  I actually have 7 similar sites where I have done this same update no problem but this one site fails every time. I'm not sure what the difference could be.
  
  I wonder if I can get my hands on an intermediate version of Freeform to try updating to if that would help?
  
  **Tags:** solspace, freeform
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-24. Score: 1
  
  > But on my remote server it deleted two thirds of the tables in the db.
  
  That sounds like some update failure happened, Craft tried to roll-back and restore the database from its pre-update attempt database backup because <https://docs.craftcms.com/v2/config-settings.html#restoreDbOnUpdateFailure> is set to `true`, then *plot twist* another failure happened before it could restored and left the database in an inconsistent state.
  
  There are tons of reasons an update might fail to go through, and nearly as many for why a restore would fail, but a good place to start would be your `craft/storage/runtime/logs` files as well as your web server's log files.
  
  
  ---
  
  