CustomFields - drop unused 'javascript' column
authorColeman Watts <coleman@civicrm.org>
Thu, 30 Mar 2023 03:08:49 +0000 (23:08 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 30 Mar 2023 03:15:41 +0000 (23:15 -0400)
CRM/Core/DAO/CustomField.php
CRM/Upgrade/Incremental/php/FiveSixtyOne.php
xml/schema/Core/CustomField.xml

index b10811d8cec0c67001b42f7aed9a69f075f13eec..5ca56b5531ac632fa1d13437f7e77aa055b4b2e8 100644 (file)
@@ -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,
index 6769e552ea0cf49f906ce4e63dab60507b86c58f..88d730e41b60642e3f428e09cca0aecbe12b4b3b 100644 (file)
@@ -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');
index 01ed1a33ec410fe854be201911140f77a73f1453..515cf34e935b0740c7dfe75509057851b312f8af 100644 (file)
     <type>varchar</type>
     <title>Custom Field Formatting</title>
     <length>64</length>
-    <comment>Optional format instructions for specific field types, like date types.</comment>
+    <comment>Unused</comment>
     <add>1.1</add>
     <drop>5.59</drop>
   </field>
     <type>varchar</type>
     <title>Custom Field Javascript</title>
     <length>255</length>
-    <comment>Optional scripting attributes for field.</comment>
+    <comment>Unused</comment>
     <add>1.1</add>
+    <drop>5.61</drop>
   </field>
   <field>
     <name>is_active</name>