CRM_Upgrade_Incremental_php_FourSeven
class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base
Upgrade logic for 4.7
Constants
BATCH_SIZE |
|
Methods
Compute any messages which should be displayed beforeupgrade.
Compute any messages which should be displayed after upgrade.
Syntactic sugar for adding a task.
Remove a payment processor if not in use
No description
Add a column to a table if it doesn't already exist
Do any relevant message template updates.
Re-save any valid values from contribute settings into the normal setting format.
Drop a column from a table if it exist.
Add a index to a table column.
Drop a index from a table if it exist.
Rebuild Multilingual Schema.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
Upgrade function.
CRM-16354
Migrate any last remaining options from civicrm_domain.config_backend
to civicrm_setting
.
Take a config_backend blob and produce an equivalent list of settings.
Update Invoice number for all completed contribution.
Migrate on-behalf information to uf_join.module_data as on-behalf columns will be dropped on DB upgrade
v4.7.11 adds a new setting "remote_profile_submissions". This is long-standing feature that existing sites may be using; however, it's a bit prone to abuse. For new sites, the default is to disable it (since that is more secure). For existing sites, the default is to enable it (since that is more compatible).
CRM-11782 - Get rid of VALUE_SEPARATOR character in saved search form values
CRM-17637 - Ths file location has been moved; delete the old one
CRM-17669 and CRM-17686, make scheduled jobs more flexible, disable the 4.6 extension if installed
CRM-17752 add index to civicrm_financial_trxn.trxn_id (deliberately non-unique).
CRM-17882 Add index to civicrm_contribution.credit_note_id.
CRM-17775 Add correct index for table civicrm_financial_item.
CRM-17951 Add accounts option values for refund and chargeback.
CRM-17999 Add index to civicrm_contribution.source.
CRM-18124 Add index to civicrm_contribution.total_amount.
CRM-18124 Add index to civicrm_contribution.total_amount.
CRM-12252 Add Help Pre and Help Post Fields for Price Field Value Table.
CRM-18464 Check if Foreign key exists and also drop any index of same name accidentially created.
CRM-18345 Don't delete mailing data on email/phone deletion Implemented here in CRM-18526
CRM-19100 - Alter Index and Type for Image URL
Add mailing template type.
CRM-18651 Add DataType column to Option Group Table
CRM-19372 Add field to store accepted credit credit cards for a payment processor.
Update Kenyan Provinces to reflect changes per CRM-20062
Deprecate provinces that no longer exist.
CRM-19961 Poputate newly added domain id column and add foriegn key onto table.
CRM-16633 - Add activity type for Change Case Status
CRM-19986 fix schema differnces in civicrm_action_schedule
Remove the contribution logging reports which have been broken for a very long time.
No description
CRM-20572 - Format date fields in Contrib Sybunt custom search's saved criteria.
CRM-20892 Convert default of created_date in civicrm_mailing table to NULL
Details
in CRM_Upgrade_Incremental_Base at line 41
bool
verifyPreDBstate($errors)
Verify DB state.
at line 43
setPreUpgradeMessage($preUpgradeMessage, string $rev, null $currentVer = NULL)
Compute any messages which should be displayed beforeupgrade.
Note: This function is called iteratively for each upcoming revision to the database.
at line 98
setPostUpgradeMessage(string $postUpgradeMessage, string $rev)
Compute any messages which should be displayed after upgrade.
in CRM_Upgrade_Incremental_Base at line 78
static bool
runSql(CRM_Queue_TaskContext $ctx, string $rev)
(Queue Task Callback)
in CRM_Upgrade_Incremental_Base at line 96
protected
addTask(string $title, string $funcName)
Syntactic sugar for adding a task.
Task is (a) in this class and (b) has a high priority.
After passing the $funcName, you can also pass parameters that will go to the function. Note that all params must be serializable.
in CRM_Upgrade_Incremental_Base at line 121
static bool
removePaymentProcessorType(CRM_Queue_TaskContext $ctx, string $name)
Remove a payment processor if not in use
in CRM_Upgrade_Incremental_Base at line 140
static bool
checkFKExists(string $table_name, string $constraint_name)
in CRM_Upgrade_Incremental_Base at line 156
static bool
addColumn(CRM_Queue_TaskContext $ctx, string $table, string $column, string $properties, bool $localizable = FALSE, string|null $version = NULL)
Add a column to a table if it doesn't already exist
in CRM_Upgrade_Incremental_Base at line 194
static
updateMessageTemplates(CRM_Queue_TaskContext $ctx, string $version)
Do any relevant message template updates.
in CRM_Upgrade_Incremental_Base at line 213
static bool
updateContributeSettings($ctx)
Re-save any valid values from contribute settings into the normal setting format.
We render the array of contribution_invoice_settings and any that have metadata defined we add to the correct key. This is safe to run even if no settings are to be converted, per the test in testConvertUpgradeContributeSettings.
in CRM_Upgrade_Incremental_Base at line 231
bool
updateSmartGroups(CRM_Queue_TaskContext $ctx, array $actions)
Do any relevant smart group updates.
in CRM_Upgrade_Incremental_Base at line 245
static bool
dropColumn(CRM_Queue_TaskContext $ctx, string $table, string $column)
Drop a column from a table if it exist.
in CRM_Upgrade_Incremental_Base at line 261
static bool
addIndex(CRM_Queue_TaskContext $ctx, string $table, string|array $column)
Add a index to a table column.
in CRM_Upgrade_Incremental_Base at line 276
static bool
dropIndex(CRM_Queue_TaskContext $ctx, string $table, string $indexName)
Drop a index from a table if it exist.
in CRM_Upgrade_Incremental_Base at line 289
static bool
dropTableIfEmpty(CRM_Queue_TaskContext $ctx, string $table)
Drop a table.
.. but only if it's empty.
in CRM_Upgrade_Incremental_Base at line 309
static bool
rebuildMultilingalSchema(CRM_Queue_TaskContext $ctx, string|null $version = NULL)
Rebuild Multilingual Schema.
at line 178
upgrade_4_7_alpha1(string $rev)
Upgrade function.
at line 191
upgrade_4_7_alpha4(string $rev)
Upgrade function.
at line 202
upgrade_4_7_beta2(string $rev)
Upgrade function.
at line 212
upgrade_4_7_beta6(string $rev)
Upgrade function.
at line 223
upgrade_4_7_1(string $rev)
Upgrade function.
at line 233
upgrade_4_7_2(string $rev)
Upgrade function.
at line 245
upgrade_4_7_3(string $rev)
Upgrade function.
at line 255
upgrade_4_7_4(string $rev)
Upgrade function.
at line 265
upgrade_4_7_7(string $rev)
Upgrade function.
at line 278
upgrade_4_7_8(string $rev)
Upgrade function.
at line 288
upgrade_4_7_10(string $rev)
Upgrade function.
at line 299
upgrade_4_7_11(string $rev)
Upgrade function.
at line 310
upgrade_4_7_12(string $rev)
Upgrade function.
at line 320
upgrade_4_7_13(string $rev)
Upgrade function.
at line 331
upgrade_4_7_14(string $rev)
Upgrade function.
at line 341
upgrade_4_7_15(string $rev)
Upgrade function.
at line 352
upgrade_4_7_16(string $rev)
Upgrade function.
at line 370
upgrade_4_7_18(string $rev)
Upgrade function.
at line 380
upgrade_4_7_19(string $rev)
Upgrade function.
at line 403
upgrade_4_7_20(string $rev)
Upgrade function.
at line 415
upgrade_4_7_23(string $rev)
Upgrade function.
at line 426
upgrade_4_7_25(string $rev)
Upgrade function.
at line 451
upgrade_4_7_27(string $rev)
Upgrade function.
at line 469
upgrade_4_7_28(string $rev)
Upgrade function.
at line 494
upgrade_4_7_31(string $rev)
Upgrade function.
at line 506
upgrade_4_7_32(string $rev)
Upgrade function.
at line 536
static int
updateWysiwyg()
CRM-16354
at line 553
static bool
migrateSettings(CRM_Queue_TaskContext $ctx)
Migrate any last remaining options from civicrm_domain.config_backend
to civicrm_setting
.
Cleanup setting schema.
at line 623
static array
convertBackendToSettings(int $domainId, string $config_backend)
Take a config_backend blob and produce an equivalent list of settings.
at line 656
static bool
updateContributionInvoiceNumber(CRM_Queue_TaskContext $ctx, int $startID, int $endID, string $invoicePrefix)
Update Invoice number for all completed contribution.
at line 677
static bool
addGettingStartedDashlet(CRM_Queue_TaskContext $ctx)
Add Getting Started dashlet to dashboard
at line 703
static bool
migrateOnBehalfOfInfo(CRM_Queue_TaskContext $ctx)
Migrate on-behalf information to uf_join.module_data as on-behalf columns will be dropped on DB upgrade
at line 773
static bool
migrateRemoteSubmissionsSetting(CRM_Queue_TaskContext $ctx)
v4.7.11 adds a new setting "remote_profile_submissions". This is long-standing feature that existing sites may be using; however, it's a bit prone to abuse. For new sites, the default is to disable it (since that is more secure). For existing sites, the default is to enable it (since that is more compatible).
at line 798
static bool
fixContactTypeInSmartGroups(CRM_Queue_TaskContext $ctx)
CRM-11782 - Get rid of VALUE_SEPARATOR character in saved search form values
at line 823
static bool
deleteVersionCheckCacheFile(CRM_Queue_TaskContext $ctx)
CRM-17637 - Ths file location has been moved; delete the old one
at line 839
static bool
disableFlexibleJobsExtension(CRM_Queue_TaskContext $ctx)
CRM-17669 and CRM-17686, make scheduled jobs more flexible, disable the 4.6 extension if installed
at line 857
static bool
addIndexFinancialTrxnTrxnID(CRM_Queue_TaskContext $ctx)
CRM-17752 add index to civicrm_financial_trxn.trxn_id (deliberately non-unique).
at line 870
static bool
addIndexContributionCreditNoteID(CRM_Queue_TaskContext $ctx)
CRM-17882 Add index to civicrm_contribution.credit_note_id.
at line 885
static bool
addCombinedIndexFinancialItemEntityIDEntityType()
CRM-17775 Add correct index for table civicrm_financial_item.
Note that the entity ID should always precede the entity_table as it is more unique. This is better for performance and does not cause fallback to no index if table it omitted.
at line 900
static
addRefundAndChargeBackAccountsIfNotExist()
CRM-17951 Add accounts option values for refund and chargeback.
Add Chargeback contribution status and Chargeback and Contra account relationships, checking first if one exists.
at line 933
static bool
addIndexContributionSource(CRM_Queue_TaskContext $ctx)
CRM-17999 Add index to civicrm_contribution.source.
at line 948
static bool
addIndexContributionAmount(CRM_Queue_TaskContext $ctx)
CRM-18124 Add index to civicrm_contribution.total_amount.
Note that I made this a combined index with receive_date because the issue included both criteria and they seemed likely to be used in conjunction to me in other cases.
at line 965
static bool
addDeletedByMergeActivityType(CRM_Queue_TaskContext $ctx)
CRM-18124 Add index to civicrm_contribution.total_amount.
Note that I made this a combined index with receive_date because the issue included both criteria and they seemed likely to be used in conjunction to me in other cases.
at line 984
static bool
addHelpPreAndHelpPostFieldsPriceFieldValue(CRM_Queue_TaskContext $ctx)
CRM-12252 Add Help Pre and Help Post Fields for Price Field Value Table.
at line 1021
static bool
dropActionScheudleMappingForeignKey(CRM_Queue_TaskContext $ctx)
CRM-18464 Check if Foreign key exists and also drop any index of same name accidentially created.
at line 1034
static bool
upgradeMailingFKs(CRM_Queue_TaskContext $ctx)
CRM-18345 Don't delete mailing data on email/phone deletion Implemented here in CRM-18526
at line 1093
static bool
dashboardSchemaUpdate(CRM_Queue_TaskContext $ctx)
CRM-17663 - Dashboard schema changes
at line 1130
static bool
alterIndexAndTypeForImageURL()
CRM-19100 - Alter Index and Type for Image URL
at line 1146
static bool
addMailingTemplateType()
Add mailing template type.
at line 1161
static bool
addDataTypeColumnToOptionGroupTable()
CRM-18651 Add DataType column to Option Group Table
at line 1182
static bool
addWysiwygPresets()
CRM-19372 Add field to store accepted credit credit cards for a payment processor.
at line 1218
static
updateKenyanProvinces(CRM_Queue_TaskContext $ctx)
Update Kenyan Provinces to reflect changes per CRM-20062
at line 1237
static
deprecateStateProvinces(int $countryID, array $provinces)
Deprecate provinces that no longer exist.
at line 1269
static
populateSMSProviderDomainId()
CRM-19961 Poputate newly added domain id column and add foriegn key onto table.
at line 1293
static bool
addChangeCaseSubjectActivityType(CRM_Queue_TaskContext $ctx)
CRM-16633 - Add activity type for Change Case Status
at line 1308
static
fixSchemaOnCiviCRMActionSchedule()
CRM-19986 fix schema differnces in civicrm_action_schedule
at line 1321
static
pickActivityRevisionPolicy(CRM_Queue_TaskContext $ctx)
at line 1335
static bool
tajikistanMissingSubdivisions(CRM_Queue_TaskContext $ctx)
Add in missing Tajikistan Subdivisions
at line 1357
static bool
removeContributionLoggingReports(CRM_Queue_TaskContext $ctx)
Remove the contribution logging reports which have been broken for a very long time.
at line 1384
protected bool
checkImageUploadDir()
at line 1397
static bool
fixDateFieldsInSmartGroups(CRM_Queue_TaskContext $ctx)
CRM-20572 - Format date fields in Contrib Sybunt custom search's saved criteria.
at line 1411
static bool
civiMailingCreatedDateNull(CRM_Queue_TaskContext $ctx)
CRM-20892 Convert default of created_date in civicrm_mailing table to NULL