From c4dc500df6a71870e6efba4ff1daf3b0011ece86 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 29 Mar 2023 23:08:49 -0400 Subject: [PATCH] CustomFields - drop unused 'javascript' column --- CRM/Core/DAO/CustomField.php | 31 +------------------- CRM/Upgrade/Incremental/php/FiveSixtyOne.php | 3 ++ xml/schema/Core/CustomField.xml | 5 ++-- 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/CRM/Core/DAO/CustomField.php b/CRM/Core/DAO/CustomField.php index b10811d8ce..5ca56b5531 100644 --- a/CRM/Core/DAO/CustomField.php +++ b/CRM/Core/DAO/CustomField.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/CustomField.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:750b48519edde8bbaa9012408bd8ba40) + * (GenCodeChecksum:c3376c499386c62d1a00eaa6e18d0874) */ /** @@ -176,15 +176,6 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { */ public $attributes; - /** - * Optional scripting attributes for field. - * - * @var string|null - * (SQL type: varchar(255)) - * Note that values will be retrieved from the database as a string. - */ - public $javascript; - /** * Is this property active? * @@ -676,26 +667,6 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { 'localizable' => 0, 'add' => '1.1', ], - 'javascript' => [ - 'name' => 'javascript', - 'type' => CRM_Utils_Type::T_STRING, - 'title' => ts('Custom Field Javascript'), - 'description' => ts('Optional scripting attributes for field.'), - 'maxlength' => 255, - 'size' => CRM_Utils_Type::HUGE, - 'usage' => [ - 'import' => FALSE, - 'export' => FALSE, - 'duplicate_matching' => FALSE, - 'token' => FALSE, - ], - 'where' => 'civicrm_custom_field.javascript', - 'table_name' => 'civicrm_custom_field', - 'entity' => 'CustomField', - 'bao' => 'CRM_Core_BAO_CustomField', - 'localizable' => 0, - 'add' => '1.1', - ], 'is_active' => [ 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, diff --git a/CRM/Upgrade/Incremental/php/FiveSixtyOne.php b/CRM/Upgrade/Incremental/php/FiveSixtyOne.php index 6769e552ea..88d730e41b 100644 --- a/CRM/Upgrade/Incremental/php/FiveSixtyOne.php +++ b/CRM/Upgrade/Incremental/php/FiveSixtyOne.php @@ -58,6 +58,9 @@ class CRM_Upgrade_Incremental_php_FiveSixtyOne extends CRM_Upgrade_Incremental_B $this->addTask('Make PaymentProcessor.title required', 'alterColumn', 'civicrm_payment_processor', 'title', "varchar(255) NOT NULL COMMENT 'Name of processor when shown to CiviCRM administrators.'", TRUE); $this->addTask('Make PaymentProcessor.frontend_title required', 'alterColumn', 'civicrm_payment_processor', 'frontend_title', "varchar(255) NOT NULL COMMENT 'Name of processor when shown to users making a payment.'", TRUE); + // Drop unused column + $this->addTask('Drop column civicrm_custom_field.javascript', 'dropColumn', 'civicrm_custom_field', 'javascript'); + $this->addTask(ts('Dedupe cache table'), 'dedupeCache'); $this->addTask(ts('Drop index %1', [1 => 'civicrm_cache.UI_group_path_date']), 'dropIndex', 'civicrm_cache', 'UI_group_path_date'); $this->addTask(ts('Create index %1', [1 => 'civicrm_cache.UI_group_name_path']), 'addIndex', 'civicrm_cache', [['group_name', 'path']], 'UI'); diff --git a/xml/schema/Core/CustomField.xml b/xml/schema/Core/CustomField.xml index 01ed1a33ec..515cf34e93 100644 --- a/xml/schema/Core/CustomField.xml +++ b/xml/schema/Core/CustomField.xml @@ -169,7 +169,7 @@ varchar Custom Field Formatting 64 - Optional format instructions for specific field types, like date types. + Unused 1.1 5.59 @@ -186,8 +186,9 @@ varchar Custom Field Javascript 255 - Optional scripting attributes for field. + Unused 1.1 + 5.61 is_active -- 2.25.1