mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 21:48:05 +02:00
Various UI improvements
This commit is contained in:
parent
bcbf5de9c4
commit
8d0a9d0926
7 changed files with 253 additions and 123 deletions
|
@ -7,6 +7,36 @@ use CRM_Contactcats_ExtensionUtil as E;
|
|||
*/
|
||||
class CRM_Contactcats_Upgrader extends CRM_Extension_Upgrader_Base {
|
||||
|
||||
/**
|
||||
* Add presentation_order
|
||||
*
|
||||
* @return TRUE on success
|
||||
* @throws CRM_Core_Exception
|
||||
*/
|
||||
public function upgrade_0001(): bool {
|
||||
$this->ctx->log->info('Applying update 0001: add presentation_order');
|
||||
CRM_Core_DAO::executeQuery(<<<SQL
|
||||
ALTER TABLE civicrm_contact_category_definition
|
||||
ADD `presentation_order` int(1) unsigned NOT NULL DEFAULT 10 COMMENT 'The order to present categories in, lowest number first.'
|
||||
SQL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add description field
|
||||
*
|
||||
* @return TRUE on success
|
||||
* @throws CRM_Core_Exception
|
||||
*/
|
||||
public function upgrade_0002(): bool {
|
||||
$this->ctx->log->info('Applying update 0001: add presentation_order');
|
||||
CRM_Core_DAO::executeQuery(<<<SQL
|
||||
ALTER TABLE civicrm_contact_category_definition
|
||||
ADD `description` text DEFAULT NULL
|
||||
SQL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// By convention, functions that look like "function upgrade_NNNN()" are
|
||||
// upgrade tasks. They are executed in order (like Drupal's hook_update_N).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue