Skip to content

Commit

Permalink
QueueItem - Upgrades from <v4.2 are not supported. Remove special `CR…
Browse files Browse the repository at this point in the history
…EATE TABLE`.
  • Loading branch information
totten committed Mar 1, 2022
1 parent c792073 commit 3e536d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
19 changes: 2 additions & 17 deletions CRM/Queue/BAO/QueueItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,14 @@ class CRM_Queue_BAO_QueueItem extends CRM_Queue_DAO_QueueItem {
*/
public static function findCreateTable(): bool {
if (!CRM_Core_DAO::checkTableExists('civicrm_queue_item')) {
return static::createTable();
// Table originated in 4.2. We no longer support direct upgrades from <=4.2. Don't bother trying to create table.
return FALSE;
}
else {
return static::updateTable();
}
}

/**
* Create the `civicrm_queue_item` table.
*
* @return bool
* @throws \CRM_Core_Exception
*/
protected static function createTable(): bool {
// civicrm/sql/civicrm_queue_item.mysql
$fileName = dirname(__FILE__) . '/../../../sql/civicrm_queue_item.mysql';

$config = CRM_Core_Config::singleton();
CRM_Utils_File::sourceSQLFile($config->dsn, $fileName);

return CRM_Core_DAO::checkTableExists('civicrm_queue_item');
}

/**
* Ensure that the `civicrm_queue_item` table is up-to-date.
*
Expand Down
33 changes: 0 additions & 33 deletions sql/civicrm_queue_item.mysql

This file was deleted.

0 comments on commit 3e536d1

Please sign in to comment.