Remove campaign_id pseudoconstants
authorColeman Watts <coleman@civicrm.org>
Sat, 30 Jan 2021 00:28:06 +0000 (19:28 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 4 Feb 2021 19:46:29 +0000 (14:46 -0500)
commit83225dce9c266d49465f12274943b9db769b561a
treef5dbf4160f30db69a199c668d03ae96d3a7ed968
parent69bb8c7f553de544d2adc74d42a4fb72f7de6bd6
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.
22 files changed:
CRM/Activity/DAO/Activity.php
CRM/Campaign/DAO/CampaignGroup.php
CRM/Campaign/DAO/Survey.php
CRM/Contribute/DAO/Contribution.php
CRM/Contribute/DAO/ContributionPage.php
CRM/Contribute/DAO/ContributionRecur.php
CRM/Event/DAO/Event.php
CRM/Event/DAO/Participant.php
CRM/Mailing/DAO/Mailing.php
CRM/Member/DAO/Membership.php
CRM/Pledge/DAO/Pledge.php
xml/schema/Activity/Activity.xml
xml/schema/Campaign/CampaignGroup.xml
xml/schema/Campaign/Survey.xml
xml/schema/Contribute/Contribution.xml
xml/schema/Contribute/ContributionPage.xml
xml/schema/Contribute/ContributionRecur.xml
xml/schema/Event/Event.xml
xml/schema/Event/Participant.xml
xml/schema/Mailing/Mailing.xml
xml/schema/Member/Membership.xml
xml/schema/Pledge/Pledge.xml