Answers.Body: <p>This often happens when an update fails and the database isn't restored correctly before retrying the update.</p>
  <p>Try to manually re-import your backup in an <strong>empty</strong> database (that's the important part), next, rename/remove your current <code>config/project</code> folder.</p>
  <p>With your backup re-imported, run <code>php craft migrate/all</code> from your terminal and the migrations should complete properly this time.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-08T14:07:39.123Z
Answers.LastActivityDate: 2022-06-08T14:07:39.123Z
Answers.UserDisplayName: Oli
Body: <p>I am getting this error when processing the upgrade</p>
  <ul>
  <li>m210613_145522_sortable_global_sets
  <ul>
  <li>m210613_184103_announcements</li>
  <li>m210829_000000_element_index_tweak</li>
  </ul>
  </li>
  </ul>
  <p>applying m210613_145522_sortable_global_sets
  add column sortOrder smallint UNSIGNED AFTER <code>fieldLayoutId</code> to table {{%globalsets}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrder'
  The SQL being executed was: ALTER TABLE <code>globalsets</code> ADD <code>sortOrder</code> smallint(6) UNSIGNED AFTER <code>fieldLayoutId</code> (/var/www/savillsplace/vendor/yiisoft/yii2/db/Schema.php:676)
  #0 /var/www/savillsplace/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema-&gt;convertException()
  #1 /var/www/savillsplace/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command-&gt;internalExecute()
  #2 /var/www/savillsplace/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command-&gt;execute()
  #3 /var/www/savillsplace/vendor/craftcms/cms/src/migrations/m210613_145522_sortable_global_sets.php(22): yii\</p>
  <p>anyone please assist us on this issue</p>
  
Tags: <migration>
Title: migration failed m210613_145522_sortable_global_sets
ThreadText: # migration failed m210613_145522_sortable_global_sets
  
  (Asked by: username_0 on 2022-06-08)
  
  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
  
  **Tags:** migration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-06-08. Score: 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.
  
  
  ---
  
  