class CRM_Upgrade_Incremental_php_FourThree extends CRM_Upgrade_Incremental_Base

Upgrade logic for 4.3

Constants

BATCH_SIZE

Methods

bool
verifyPreDBstate($errors)

Verify DB state.

setPreUpgradeMessage($preUpgradeMessage, string $rev, null $currentVer = NULL)

Compute any messages which should be displayed beforeupgrade.

setPostUpgradeMessage(string $postUpgradeMessage, string $rev)

Compute any messages which should be displayed after upgrade.

static bool
runSql( $ctx, string $rev)

(Queue Task Callback)

addTask(string $title, string $funcName)

Syntactic sugar for adding a task.

static bool
removePaymentProcessorType( $ctx, string $name)

Remove a payment processor if not in use

static bool
checkFKExists(string $table_name, string $constraint_name)

No description

static bool
addColumn(CRM_Queue_TaskContext $ctx, string $table, string $column, string $properties)

Add a column to a table if it doesn't already exist

static bool
dropColumn(CRM_Queue_TaskContext $ctx, string $table, string $column)

Drop a column from a table if it exist.

static bool
addIndex(CRM_Queue_TaskContext $ctx, string $table, string|array $column)

Add a index to a table column.

static bool
dropIndex(CRM_Queue_TaskContext $ctx, string $table, string $indexName)

Drop a index from a table if it exist.

bool
upgrade_4_3_alpha1($rev)

No description

upgrade_4_3_alpha2($rev)

No description

upgrade_4_3_alpha3($rev)

No description

upgrade_4_3_beta2($rev)

No description

upgrade_4_3_beta3($rev)

No description

upgrade_4_3_beta4($rev)

No description

upgrade_4_3_beta5($rev)

No description

upgrade_4_3_4($rev)

No description

upgrade_4_3_5($rev)

No description

upgrade_4_3_6($rev)

No description

static bool
bool
createFinancialRecords()

No description

array
createDomainContacts()

No description

bool
convertTimestamps( $ctx, int $startId, int $endId)

Read creation and modification times from civicrm_log; add them to civicrm_contact.

bool
addMissingConstraints( $ctx)

Change index and add missing constraints for civicrm_contribution_recur.

bool
updateFinancialTrxnData( $ctx)

Update financial_account_id for bad data in financial_trxn table.

bool
updateLineItemData( $ctx)

Update financial_account_id for bad data in financial_trxn table.

bool
replaceContributionTypeId( $ctx, string $query, string $table)

Replace contribution_type to financial_type in table.

bool
task_4_3_x_checkConstraints( $ctx)

Add ON DELETE options for constraint if not present.

bool
task_4_3_x_checkIndexes( $ctx)

Check/Add INDEX CRM-12141

static bool
phoneNumeric( $ctx)

Update phones CRM-11292

Details

bool verifyPreDBstate($errors)

Verify DB state.

Parameters

$errors

Return Value

bool

at line 46
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.

Parameters

$preUpgradeMessage
string $rev a version number, e.g. '4.8.alpha1', '4.8.beta3', '4.8.0'.
null $currentVer

at line 113
setPostUpgradeMessage(string $postUpgradeMessage, string $rev)

Compute any messages which should be displayed after upgrade.

Parameters

string $postUpgradeMessage alterable.
string $rev an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.

static bool runSql( $ctx, string $rev)

(Queue Task Callback)

Parameters

$ctx
string $rev

Return Value

bool

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.

Parameters

string $title
string $funcName

static bool removePaymentProcessorType( $ctx, string $name)

Remove a payment processor if not in use

Parameters

$ctx
string $name

Return Value

bool

Exceptions

CiviCRM_API3_Exception

static bool checkFKExists(string $table_name, string $constraint_name)

Parameters

string $table_name
string $constraint_name

Return Value

bool

static bool addColumn(CRM_Queue_TaskContext $ctx, string $table, string $column, string $properties)

Add a column to a table if it doesn't already exist

Parameters

CRM_Queue_TaskContext $ctx
string $table
string $column
string $properties

Return Value

bool

static bool dropColumn(CRM_Queue_TaskContext $ctx, string $table, string $column)

Drop a column from a table if it exist.

Parameters

CRM_Queue_TaskContext $ctx
string $table
string $column

Return Value

bool

static bool addIndex(CRM_Queue_TaskContext $ctx, string $table, string|array $column)

Add a index to a table column.

Parameters

CRM_Queue_TaskContext $ctx
string $table
string|array $column

Return Value

bool

static bool dropIndex(CRM_Queue_TaskContext $ctx, string $table, string $indexName)

Drop a index from a table if it exist.

Parameters

CRM_Queue_TaskContext $ctx
string $table
string $indexName

Return Value

bool

at line 240
bool upgrade_4_3_alpha1($rev)

Parameters

$rev

Return Value

bool

at line 278
upgrade_4_3_alpha2($rev)

Parameters

$rev

at line 290
upgrade_4_3_alpha3($rev)

Parameters

$rev

at line 297
upgrade_4_3_beta2($rev)

Parameters

$rev

at line 312
upgrade_4_3_beta3($rev)

Parameters

$rev

at line 324
upgrade_4_3_beta4($rev)

Parameters

$rev

at line 334
upgrade_4_3_beta5($rev)

Parameters

$rev

at line 361
upgrade_4_3_4($rev)

Parameters

$rev

at line 368
upgrade_4_3_5($rev)

Parameters

$rev

at line 396
upgrade_4_3_6($rev)

Parameters

$rev

at line 412
bool assignFinancialTypeToPriceRecords()

CRM-11636

Return Value

bool

at line 456
static bool _checkAndMigrateDefaultFinancialTypes()

Return Value

bool

at line 488
bool createFinancialRecords()

Return Value

bool

at line 832
array createDomainContacts()

Return Value

array

at line 879
task_4_3_alpha1_checkDBConstraints()

at line 949
bool convertTimestamps( $ctx, int $startId, int $endId)

Read creation and modification times from civicrm_log; add them to civicrm_contact.

Parameters

$ctx
int $startId
int $endId

Return Value

bool

at line 984
bool addMissingConstraints( $ctx)

Change index and add missing constraints for civicrm_contribution_recur.

Parameters

$ctx

Return Value

bool

at line 1019
bool updateFinancialTrxnData( $ctx)

Update financial_account_id for bad data in financial_trxn table.

CRM-12844

Parameters

$ctx

Return Value

bool

at line 1085
bool updateLineItemData( $ctx)

Update financial_account_id for bad data in financial_trxn table.

CRM-12844

Parameters

$ctx

Return Value

bool

at line 1156
bool replaceContributionTypeId( $ctx, string $query, string $table)

Replace contribution_type to financial_type in table.

Civicrm_saved_search and Structure civicrm_report_instance

Parameters

$ctx
string $query
string $table

Return Value

bool

at line 1237
bool task_4_3_x_checkConstraints( $ctx)

Add ON DELETE options for constraint if not present.

CRM-13088 && CRM-12156

Parameters

$ctx

Return Value

bool TRUE for success

at line 1298
bool task_4_3_x_checkIndexes( $ctx)

Check/Add INDEX CRM-12141

Parameters

$ctx

Return Value

bool TRUE for success

at line 1324
static bool phoneNumeric( $ctx)

Update phones CRM-11292

Parameters

$ctx

Return Value

bool TRUE for success