<p>This is likely because a previous attempt at updating failed, and the database wasn't reverted back to its prior state. Your best bet would be to import your backup from before the upgrade attempt and start fresh.</p>

CC BY-SA 4.0
2023-09-22T17:03:08.983Z
2023-09-22T17:03:08.983Z
CraftQuest
<p>i am trying to upgrade one of my sites up from Craft 3.6.17 to 3.7 and if i try and upgrade at all i just seem to get the following errors:</p>
<p>Any ideas what I need to do?</p>
<pre><code>Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrder'
The SQL being executed was: ALTER TABLE globalsets ADD sortOrder smallint(6) UNSIGNED AFTER fieldLayoutId

Migration: craft\migrations\m210613_145522_sortable_global_sets
</code></pre>

<craft3><upgrades>
Upgrading to Craft 3.7 errors
# Upgrading to Craft 3.7 errors

(Asked by: username_0 on 2023-09-22)

i am trying to upgrade one of my sites up from Craft 3.6.17 to 3.7 and if i try and upgrade at all i just seem to get the following errors:
Any ideas what I need to do?
Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrder'
The SQL being executed was: ALTER TABLE globalsets ADD sortOrder smallint(6) UNSIGNED AFTER fieldLayoutId

Migration: craft\migrations\m210613_145522_sortable_global_sets

**Tags:** craft3, upgrades

---

## 1 answers

### Answer by username_1 on 2023-09-22. Score: 1

This is likely because a previous attempt at updating failed, and the database wasn't reverted back to its prior state. Your best bet would be to import your backup from before the upgrade attempt and start fresh.


---

