1

I am getting this error when processing the upgrade

  • m210613_145522_sortable_global_sets
    • m210613_184103_announcements
    • m210829_000000_element_index_tweak

applying m210613_145522_sortable_global_sets add column sortOrder smallint UNSIGNED AFTER fieldLayoutId to table {{%globalsets}} ...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 (/var/www/savillsplace/vendor/yiisoft/yii2/db/Schema.php:676) #0 /var/www/savillsplace/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException() #1 /var/www/savillsplace/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command->internalExecute() #2 /var/www/savillsplace/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command->execute() #3 /var/www/savillsplace/vendor/craftcms/cms/src/migrations/m210613_145522_sortable_global_sets.php(22): yii\

anyone please assist us on this issue

1 Answer 1

2

This often happens when an update fails and the database isn't restored correctly before retrying the update.

Try to manually re-import your backup in an empty database (that's the important part), next, rename/remove your current config/project folder.

With your backup re-imported, run php craft migrate/all from your terminal and the migrations should complete properly this time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.