<p>Something is definitely out of sync, yes – to make sure everything is in order before proceeding to retry the upgrade, I'd try the following:</p>
<ol>
<li>Restore the database to a backup pre-upgrade attempt</li>
<li>Restore the composer.json and composer.lock files to their state pre-upgrade attempt</li>
<li>Delete the <code>vendor</code> folder and run <code>composer install</code></li>
<li>Clear all caches via <code>php craft clear-caches/all</code> (or via the Clear Caches utility in the Control Panel)</li>
<li>Rebuild the project config via <code>php craft project-config/rebuild</code> (or via the Project Config utility in the Control Panel)</li>
</ol>
<p>Finally, if by &quot;crashed&quot; you mean that the previous upgrade attempt failed due to a PHP timeout, consider upgrading using Craft's CLI, i.e. by running <code>php craft update</code> in your terminal instead of upgrading via the Control Panel.</p>

CC BY-SA 4.0
2022-03-01T08:39:10.257Z
Ok - I have completed 1-5 above.
When I look in the db craft_info version says 3.6.16
When I try to access the control panel I get the message:
"To complete the update, some changes must be made to your database." with the finish up button. 
When I click that and when it completes the craft_info table version now shows: 3.7.34

This doesn't seem right. What makes that "Complete the update" element run?
mmc501
CC BY-SA 4.0
2022-03-01T11:23:15.620Z
If I manually change my composer.json file to the latest version then run composer update, is that a safe method to bring me back into sync?
mmc501
CC BY-SA 4.0
2022-03-01T18:38:59.047Z
If you get the `To complete the update...` message after completing those steps, and those migrations actually run, that definitely means that you've still got Craft 3.7.34 in your `vendor` folder, not 3.6.16. Most likely, that would mean your (restored) `composer.lock` file doesn't specify the version you think it does. After completing steps 1 and 2, I'd double check that file to see if it actually specifies 3.6.16 (you can do a text search for `"name": "craftcms/cms"`).
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2022-03-01T22:06:52.027Z
Just checked in the composer.lock file I was using: I am getting this:
`"name": "craftcms/cms", "version": "3.6.16",` so seems to be ok.
Looking at my composer.lock file after `To complete the update...` has run it still says `"name": "craftcms/cms", "version": "3.6.16",` and composer.json file still says: `"require": {"craftcms/cms": "3.6.16",`.  But when I login to the control panel it has all the features of 3.7.34 (i checked change log).  When I go to vendor/craftcms/cms/composer.json it says `"version": "3.6.16"`
mmc501
CC BY-SA 4.0
2022-03-01T23:04:42.440Z
I've now checked the staging location - I had been doing the above locally. 
It has seemed to upgrade ok when I tried and the composer.json and composer.lock are all showing 3.7.34
I will maybe pull that version down and proceed from there.  The above I have no idea what is going on, the files showing 3.6.16 and the Control Panel and db showing 3.7.34
mmc501
CC BY-SA 4.0
2022-03-01T23:52:06.757Z
Yeah, then I have no idea what’s going on, sorry.
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2022-03-02T08:20:40.447Z
Thanks for the assistance
mmc501
CC BY-SA 4.0
2022-03-01T08:11:07.353Z
2022-03-01T08:11:07.353Z
Mats Mikkel Rummelhoff
<p>Have a site which is on version 3.6.16
I was running the upgrade to the latest versions and it crashed.<br />
I have restored the database and componser.json and composer.lock files and ran composer install after removing the vendor folder. (Database shows version 3.6.16)</p>
<p>When I try to access the control panel then I get the message:</p>
<p>To complete the update, some changes must be made to your database.
When I click on Finish Up - some database changes get applied and when logged in it says I'm on version 3.7.34</p>
<p>When I look at composer.json it still says &quot;craftcms/cms&quot;: &quot;3.6.16&quot;.</p>
<p>I'm fairly sure something is out of sync here - I don't think I should be getting the &quot;To complete the update&quot; message and migrations applied?</p>
<p>The control panel seems to work ok at the moment but it says there are no updates available.</p>

<updates><upgrades>
composer.json showing different version to database
# composer.json showing different version to database

(Asked by: username_0 on 2022-02-28)

Have a site which is on version 3.6.16
I was running the upgrade to the latest versions and it crashed.  
I have restored the database and componser.json and composer.lock files and ran composer install after removing the vendor folder. (Database shows version 3.6.16)

When I try to access the control panel then I get the message:

To complete the update, some changes must be made to your database.
When I click on Finish Up - some database changes get applied and when logged in it says I'm on version 3.7.34

When I look at composer.json it still says "craftcms/cms": "3.6.16".

I'm fairly sure something is out of sync here - I don't think I should be getting the "To complete the update" message and migrations applied?

The control panel seems to work ok at the moment but it says there are no updates available.

**Tags:** updates, upgrades


---

## 1 answers

### Answer by username_1 on 2022-03-01. Score: 1 | Accepted answer

Something is definitely out of sync, yes – to make sure everything is in order before proceeding to retry the upgrade, I'd try the following:

1. Restore the database to a backup pre-upgrade attempt
2. Restore the composer.json and composer.lock files to their state pre-upgrade attempt
3. Delete the `vendor` folder and run `composer install`
4. Clear all caches via `php craft clear-caches/all` (or via the Clear Caches utility in the Control Panel)
5. Rebuild the project config via `php craft project-config/rebuild` (or via the Project Config utility in the Control Panel)

Finally, if by "crashed" you mean that the previous upgrade attempt failed due to a PHP timeout, consider upgrading using Craft's CLI, i.e. by running `php craft update` in your terminal instead of upgrading via the Control Panel.

> **Comments:**
> **username_0**: Ok - I have completed 1-5 above. When I look in the db craft_info version says 3.6.16 When I try to access the control panel I get the message: "To complete the update, some changes must be made to your database." with the finish up button.  When I click that and when it completes the craft_info table version now shows: 3.7.34  This doesn't seem right. What makes that "Complete the update" element run?  
> **username_0**: If I manually change my composer.json file to the latest version then run composer update, is that a safe method to bring me back into sync?  
> **username_1**: If you get the `To complete the update...` message after completing those steps, and those migrations actually run, that definitely means that you've still got Craft 3.7.34 in your `vendor` folder, not 3.6.16. Most likely, that would mean your (restored) `composer.lock` file doesn't specify the version you think it does. After completing steps 1 and 2, I'd double check that file to see if it actually specifies 3.6.16 (you can do a text search for `"name": "craftcms/cms"`).  
> **username_0**: Just checked in the composer.lock file I was using: I am getting this: `"name": "craftcms/cms", "version": "3.6.16",` so seems to be ok. Looking at my composer.lock file after `To complete the update...` has run it still says `"name": "craftcms/cms", "version": "3.6.16",` and composer.json file still says: `"require": {"craftcms/cms": "3.6.16",`.  But when I login to the control panel it has all the features of 3.7.34 (i checked change log).  When I go to vendor/craftcms/cms/composer.json it says `"version": "3.6.16"`  
> **username_0**: I've now checked the staging location - I had been doing the above locally.  It has seemed to upgrade ok when I tried and the composer.json and composer.lock are all showing 3.7.34 I will maybe pull that version down and proceed from there.  The above I have no idea what is going on, the files showing 3.6.16 and the Control Panel and db showing 3.7.34  
> **username_1**: Yeah, then I have no idea what’s going on, sorry.  
> **username_0**: Thanks for the assistance  

---

