From: Coleman Watts Date: Sat, 30 Jan 2021 00:28:06 +0000 (-0500) Subject: Remove campaign_id pseudoconstants X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=83225dce9c266d49465f12274943b9db769b561a;p=civicrm-core.git Remove campaign_id pseudoconstants Pseudoconstants are intended for option lists small enough to be loaded into memory, whereas FKs are for options of any size. It is possible to have thousands of campaigns, and some sites do, which slows or breaks some UIs (first noticed in the Search Kit bulk update action). All these fields have both an FK and a pseudoconstant declared, which is redundant; both are not needed, and the pseudoconstant was unnecessarily hogging memory for sites with many campaigns. --- diff --git a/CRM/Activity/DAO/Activity.php b/CRM/Activity/DAO/Activity.php index 6d764364cb..e1acd532bc 100644 --- a/CRM/Activity/DAO/Activity.php +++ b/CRM/Activity/DAO/Activity.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Activity/Activity.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:20d5b91c29b14f4df12aabfc07c58e94) + * (GenCodeChecksum:e40c263d7d030dc0c6d6e714317a3970) */ /** @@ -659,11 +659,6 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'activity_engagement_level' => [ diff --git a/CRM/Campaign/DAO/CampaignGroup.php b/CRM/Campaign/DAO/CampaignGroup.php index a448bd16fb..96863381a8 100644 --- a/CRM/Campaign/DAO/CampaignGroup.php +++ b/CRM/Campaign/DAO/CampaignGroup.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/CampaignGroup.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:88f73bc59595d75977b66fe76466a22c) + * (GenCodeChecksum:a10a2acb5e6198e023bf1b97883b16cf) */ /** @@ -133,11 +133,6 @@ class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO { 'bao' => 'CRM_Campaign_DAO_CampaignGroup', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.3', ], 'group_type' => [ diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index aa303547ee..72c3406648 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/Survey.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:03edb270b63048ec3aa9f36667548961) + * (GenCodeChecksum:8a55f06388a594dd78f397320b1b55a6) */ /** @@ -270,11 +270,6 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { 'bao' => 'CRM_Campaign_BAO_Survey', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.3', ], 'activity_type_id' => [ diff --git a/CRM/Contribute/DAO/Contribution.php b/CRM/Contribute/DAO/Contribution.php index e9936e8cf2..b8c6b0a03c 100644 --- a/CRM/Contribute/DAO/Contribution.php +++ b/CRM/Contribute/DAO/Contribution.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/Contribution.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:11b9f8bc6198e4338be2406de58b6723) + * (GenCodeChecksum:66fa0e83ae7eb57a3c2e515c8fdc371c) */ /** @@ -843,11 +843,6 @@ class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'creditnote_id' => [ diff --git a/CRM/Contribute/DAO/ContributionPage.php b/CRM/Contribute/DAO/ContributionPage.php index e38ebbf9fe..adc5656538 100644 --- a/CRM/Contribute/DAO/ContributionPage.php +++ b/CRM/Contribute/DAO/ContributionPage.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionPage.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:958ef76562a951e9f80b8e6f16afd6ee) + * (GenCodeChecksum:a8f42298c3fbe5b8c1986c81d77a8a0f) */ /** @@ -1033,11 +1033,6 @@ class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO { 'bao' => 'CRM_Contribute_BAO_ContributionPage', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'is_share' => [ diff --git a/CRM/Contribute/DAO/ContributionRecur.php b/CRM/Contribute/DAO/ContributionRecur.php index 9bed9fd903..08f922a170 100644 --- a/CRM/Contribute/DAO/ContributionRecur.php +++ b/CRM/Contribute/DAO/ContributionRecur.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionRecur.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:5e2fa2241a3f8c014352d897be31fad1) + * (GenCodeChecksum:69bfc032333f519d938978caf8d9d7ec) */ /** @@ -771,11 +771,6 @@ class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '4.1', ], 'is_email_receipt' => [ diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index ea4305c1da..757ff158d4 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Event.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8747fe6387fcdec07b14c8a72e35868b) + * (GenCodeChecksum:c4d88cf24f327dc7f2f303f316e200c7) */ /** @@ -1637,11 +1637,6 @@ class CRM_Event_DAO_Event extends CRM_Core_DAO { 'html' => [ 'type' => 'EntityRef', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'is_share' => [ diff --git a/CRM/Event/DAO/Participant.php b/CRM/Event/DAO/Participant.php index 34537d28fa..090bb8fe03 100644 --- a/CRM/Event/DAO/Participant.php +++ b/CRM/Event/DAO/Participant.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Participant.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:a746f8f8a28c6f945abbba148794d2c2) + * (GenCodeChecksum:f9815c8a89ad1055602bed39a0f266e8) */ /** @@ -495,11 +495,6 @@ class CRM_Event_DAO_Participant extends CRM_Core_DAO { 'bao' => 'CRM_Event_BAO_Participant', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'discount_amount' => [ diff --git a/CRM/Mailing/DAO/Mailing.php b/CRM/Mailing/DAO/Mailing.php index 0f754955da..c76e999c8c 100644 --- a/CRM/Mailing/DAO/Mailing.php +++ b/CRM/Mailing/DAO/Mailing.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Mailing/Mailing.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:e2de6d8875a7f838b190810bcec4e27e) + * (GenCodeChecksum:9e22faebb14e886d7a5b4382249a0da6) */ /** @@ -968,11 +968,6 @@ class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'dedupe_email' => [ diff --git a/CRM/Member/DAO/Membership.php b/CRM/Member/DAO/Membership.php index 3b4cc63562..a72f2fc144 100644 --- a/CRM/Member/DAO/Membership.php +++ b/CRM/Member/DAO/Membership.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Member/Membership.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:497f88dd714287acb6b42017dc0b7cd3) + * (GenCodeChecksum:614dc19edb8e63eb4a8a4c3523454511) */ /** @@ -502,11 +502,6 @@ class CRM_Member_DAO_Membership extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], ]; diff --git a/CRM/Pledge/DAO/Pledge.php b/CRM/Pledge/DAO/Pledge.php index c9ff550a9b..bb23c622e8 100644 --- a/CRM/Pledge/DAO/Pledge.php +++ b/CRM/Pledge/DAO/Pledge.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Pledge/Pledge.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8a17ba664d9a2c65860be67652def7f5) + * (GenCodeChecksum:b7f0823c6d9fed7969a2734874ed20eb) */ /** @@ -657,11 +657,6 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], ]; diff --git a/xml/schema/Activity/Activity.xml b/xml/schema/Activity/Activity.xml index 3f7ee3169c..74f1624864 100644 --- a/xml/schema/Activity/Activity.xml +++ b/xml/schema/Activity/Activity.xml @@ -339,11 +339,6 @@ Campaign true The campaign for which this activity has been triggered. - - civicrm_campaign
- id - title -
3.4 Select diff --git a/xml/schema/Campaign/CampaignGroup.xml b/xml/schema/Campaign/CampaignGroup.xml index ea143c1d1c..1c1b408082 100644 --- a/xml/schema/Campaign/CampaignGroup.xml +++ b/xml/schema/Campaign/CampaignGroup.xml @@ -25,11 +25,6 @@ int unsigned true Foreign key to the activity Campaign. - - civicrm_campaign
- id - title -
3.3 diff --git a/xml/schema/Campaign/Survey.xml b/xml/schema/Campaign/Survey.xml index 821af4bd4f..bfe0cf95c0 100644 --- a/xml/schema/Campaign/Survey.xml +++ b/xml/schema/Campaign/Survey.xml @@ -39,11 +39,6 @@ int unsigned NULL Foreign key to the Campaign. - - civicrm_campaign
- id - title -
3.3 diff --git a/xml/schema/Contribute/Contribution.xml b/xml/schema/Contribute/Contribution.xml index 6c725b1ddc..b09ee78061 100644 --- a/xml/schema/Contribute/Contribution.xml +++ b/xml/schema/Contribute/Contribution.xml @@ -451,11 +451,6 @@ Campaign true The campaign for which this contribution has been triggered. - - civicrm_campaign
- id - title -
3.4 Select diff --git a/xml/schema/Contribute/ContributionPage.xml b/xml/schema/Contribute/ContributionPage.xml index a8db2380f4..52f1df5eab 100644 --- a/xml/schema/Contribute/ContributionPage.xml +++ b/xml/schema/Contribute/ContributionPage.xml @@ -420,11 +420,6 @@ Contribution Page Campaign ID int unsigned The campaign for which we are collecting contributions with this page. - - civicrm_campaign
- id - title -
3.4 diff --git a/xml/schema/Contribute/ContributionRecur.xml b/xml/schema/Contribute/ContributionRecur.xml index fa78706c18..fd6b8a948c 100644 --- a/xml/schema/Contribute/ContributionRecur.xml +++ b/xml/schema/Contribute/ContributionRecur.xml @@ -408,11 +408,6 @@ Campaign true The campaign for which this contribution has been triggered. - - civicrm_campaign
- id - title -
4.1 Select diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index e6682fe97f..f0ff62f4ea 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -771,11 +771,6 @@ int unsigned Campaign The campaign for which this event has been created. - - civicrm_campaign
- id - title -
3.4 EntityRef diff --git a/xml/schema/Event/Participant.xml b/xml/schema/Event/Participant.xml index 6fd2a94f54..44ecd7847e 100644 --- a/xml/schema/Event/Participant.xml +++ b/xml/schema/Event/Participant.xml @@ -249,11 +249,6 @@ Campaign true The campaign for which this participant has been registered. - - civicrm_campaign
- id - title -
3.4 diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index 45264afb44..0b3422b8c3 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -415,11 +415,6 @@ int unsigned Mailing Campaign The campaign for which this mailing has been initiated. - - civicrm_campaign
- id - title -
3.4 Select diff --git a/xml/schema/Member/Membership.xml b/xml/schema/Member/Membership.xml index f8be7b3607..4a25c013c5 100644 --- a/xml/schema/Member/Membership.xml +++ b/xml/schema/Member/Membership.xml @@ -269,11 +269,6 @@ Campaign true The campaign for which this membership is attached. - - civicrm_campaign
- id - title -
3.4 Select diff --git a/xml/schema/Pledge/Pledge.xml b/xml/schema/Pledge/Pledge.xml index 6b967254f5..2f86cdef66 100644 --- a/xml/schema/Pledge/Pledge.xml +++ b/xml/schema/Pledge/Pledge.xml @@ -325,11 +325,6 @@ Campaign true The campaign for which this pledge has been initiated. - - civicrm_campaign
- id - title -
3.4 Select