Answers.Body: <p>You can try <code>UPDATE civicrm_domain SET version='5.56.0';</code> in mysql and then run the upgrade normally. Sometimes this causes different problems because some steps are not rerunnable, but I don't think that will happen between 5.56 and 5.57.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-14T00:06:07.497Z
Answers.Text: Thank you, thank you!! This worked well.
Answers.UserDisplayName: Drupal Learner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-13T21:30:41.813Z
Answers.LastActivityDate: 2023-02-13T21:30:41.813Z
Answers.UserDisplayName: Demerit
Body: <p>Earlier I wrote in with a question about a database upgrade failing because of date constraints (<a href="https://civicrm.stackexchange.com/questions/43326/upgrade-to-5-57-1-fails-with-error-executing-task-fix-dangerous-delete-cascade">Upgrade to 5.57.1 Fails With Error executing task &quot;Fix dangerous delete cascade&quot;</a>).  I did not think that this failure left the database partially upgraded.  In retrospect this make sense but it did not occur to me at the time.</p>
  <p>I think I tried with both cv and the CiviCRM Upgrade page (/civicrm/upgrade).</p>
  <p>Now after fixing the dates I am unable to upgrade the database because the database is in a partially upgraded state. I get the following error with CV.</p>
  <blockquote>
  <p>Found CiviCRM database version 5.57.alpha1.upgrade.</p>
  </blockquote>
  <blockquote>
  <p>Found CiviCRM code version 5.57.3.</p>
  </blockquote>
  <blockquote>
  <p>In UpgradeDbCommand.php line 80:</p>
  </blockquote>
  <blockquote>
  <p>Cannot resume upgrade: The log file
  (/root/.cv/upgrade/dcda99f3a7060a8eeb8c255df45c3907.dat) is missing.
  Consider a regular upgrade (without --retry or --skip).</p>
  </blockquote>
  <p>I have tried both --skip and --retry and I get the same message.</p>
  <p>I have not removed any files from the /root/.cv/upgrade/ directory and this is the only CiviCRM install I have on this server.  There is another dat file in the directory but I do not think it is the right one as it appears to shown a successful upgrade.</p>
  <p>Reverting back to a database before attempting the upgrade is not a viable option.</p>
  <p>Is there anything I can do? I appreciate any help with this.</p>
  <p>Thanks!</p>
  
Tags: <upgrade><database>
Title: Cannot Complete Upgrade
ThreadText: # Cannot Complete Upgrade
  
  (Asked by: username_0 on 2023-02-13)
  
  Earlier I wrote in with a question about a database upgrade failing because of date constraints ([Upgrade to 5.57.1 Fails With Error executing task "Fix dangerous delete cascade"](https://civicrm.stackexchange.com/questions/43326/upgrade-to-5-57-1-fails-with-error-executing-task-fix-dangerous-delete-cascade)). I did not think that this failure left the database partially upgraded. In retrospect this make sense but it did not occur to me at the time.
  
  I think I tried with both cv and the CiviCRM Upgrade page (/civicrm/upgrade).
  
  Now after fixing the dates I am unable to upgrade the database because the database is in a partially upgraded state. I get the following error with CV.
  
  > Found CiviCRM database version 5.57.alpha1.upgrade.
  
  > Found CiviCRM code version 5.57.3.
  
  > In UpgradeDbCommand.php line 80:
  
  > Cannot resume upgrade: The log file
  > (/root/.cv/upgrade/dcda99f3a7060a8eeb8c255df45c3907.dat) is missing.
  > Consider a regular upgrade (without --retry or --skip).
  
  I have tried both --skip and --retry and I get the same message.
  
  I have not removed any files from the /root/.cv/upgrade/ directory and this is the only CiviCRM install I have on this server. There is another dat file in the directory but I do not think it is the right one as it appears to shown a successful upgrade.
  
  Reverting back to a database before attempting the upgrade is not a viable option.
  
  Is there anything I can do? I appreciate any help with this.
  
  Thanks!
  
  **Tags:** upgrade, database
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-02-13. Score: 1
  
  You can try `UPDATE civicrm_domain SET version='5.56.0';` in mysql and then run the upgrade normally. Sometimes this causes different problems because some steps are not rerunnable, but I don't think that will happen between 5.56 and 5.57.
  
  > **Comments:**
  > **username_2**: Thank you, thank you!! This worked well.  
  
  ---
  
  