Upgrade to 5.51.1 from 5.50.4 on Drupal through drush command
Overview
I tried updating a site from 5.50.3 to 5.51.1 and I received this error:
error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']
[type] => DB_Error
[user_info] => UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']"]
)
Then I rebuild civicrm_queue
manually:
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE civicrm_queue;
CREATE TABLE `civicrm_queue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the queue',
`type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Type of the queue',
`runner` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Name of the task runner',
`batch_limit` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Maximum number of items in a batch.',
`lease_time` int(10) unsigned NOT NULL DEFAULT 3600 COMMENT 'When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)',
`retry_limit` int(11) NOT NULL DEFAULT 0 COMMENT 'Number of permitted retries. Set to zero (0) to disable.',
`retry_interval` int(11) DEFAULT NULL COMMENT 'Number of seconds to wait before retrying a failed execution.',
`status` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT 'active' COMMENT 'Execution status',
`error` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Fallback behavior for unhandled errors',
`is_template` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Is this a template configuration (for use by other/future queues)?',
PRIMARY KEY (`id`),
UNIQUE KEY `UI_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC
and the command drush cvupdb
worked fine.
But the CiviCRM menu is no longer visible.
Reproduction steps
- go to the Drupal site root dir
composer update
drush cvupdb
- Got an error "DB Error: no such field".
- CiviCRM menu is no longer visibile
Environment information
- Browser: Firefox 59.0.1/Chrome 78.0.3904/Safari 13
- CiviCRM: CiviCRM 5.51.1
- PHP: 7.4
- CMS: Drupal 9_
- Database: 10.5.12-MariaDB