class CRM_Upgrade_Incremental_php_FourTwo extends CRM_Upgrade_Incremental_Base

Upgrade logic for 4.2

Constants

BATCH_SIZE

SETTINGS_SNIPPET_PATTERN

SETTINGS_SNIPPET

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.

upgrade_4_2_alpha1($rev)

No description

upgrade_4_2_beta2($rev)

No description

upgrade_4_2_beta3($rev)

No description

upgrade_4_2_beta5($rev)

No description

upgrade_4_2_0($rev)

No description

upgrade_4_2_2($rev)

No description

upgrade_4_2_3($rev)

No description

upgrade_4_2_5($rev)

No description

convertContribution()

No description

static bool
task_4_2_alpha1_createPriceSets( $ctx, string $rev)

(Queue Task Callback)

static 
createPriceSet(string $daoName, string $addTo, array $options = array())

Create price sets.

static bool
task_4_2_alpha1_convertContributions( $ctx, int $startId, int $endId)

(Queue Task Callback)

static bool
task_4_2_alpha1_convertParticipants( $ctx, int $startId, int $endId)

(Queue Task Callback)

static bool
task_4_2_alpha1_eventProfile( $ctx)

(Queue Task Callback)

static array
deleteInvalidPairs()

No description

Details

bool verifyPreDBstate($errors)

Verify DB state.

Parameters

$errors

Return Value

bool

at line 48
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 143
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 160
upgrade_4_2_alpha1($rev)

Parameters

$rev

at line 208
upgrade_4_2_beta2($rev)

Parameters

$rev

at line 222
upgrade_4_2_beta3($rev)

Parameters

$rev

at line 237
upgrade_4_2_beta5($rev)

Parameters

$rev

at line 249
upgrade_4_2_0($rev)

Parameters

$rev

at line 256
upgrade_4_2_2($rev)

Parameters

$rev

at line 296
upgrade_4_2_3($rev)

Parameters

$rev

at line 338
upgrade_4_2_5($rev)

Parameters

$rev

at line 358
convertContribution()

at line 386
static bool task_4_2_alpha1_createPriceSets( $ctx, string $rev)

(Queue Task Callback)

Upgrade code to create priceset for contribution pages and events

Parameters

$ctx
string $rev

Return Value

bool

at line 442
static createPriceSet(string $daoName, string $addTo, array $options = array())

Create price sets.

Parameters

string $daoName
string $addTo
array $options

at line 586
static bool task_4_2_alpha1_convertContributions( $ctx, int $startId, int $endId)

(Queue Task Callback)

Find any contribution records and create corresponding line-item records.

Parameters

$ctx
int $startId the first/lowest contribution ID to convert.
int $endId the last/highest contribution ID to convert.

Return Value

bool

at line 737
static bool task_4_2_alpha1_convertParticipants( $ctx, int $startId, int $endId)

(Queue Task Callback)

Find any participant records and create corresponding line-item records.

Parameters

$ctx
int $startId the first/lowest participant ID to convert.
int $endId the last/highest participant ID to convert.

Return Value

bool

at line 797
static bool task_4_2_alpha1_eventProfile( $ctx)

(Queue Task Callback)

Create an event registration profile with a single email field CRM-9587

Parameters

$ctx

Return Value

bool

at line 869
static array deleteInvalidPairs()

Return Value

array