CRM_Upgrade_Incremental_Base
class CRM_Upgrade_Incremental_Base
Base class for incremental upgrades
Constants
BATCH_SIZE |
|
Methods
Verify DB state.
Compute any messages which should be displayed before upgrade.
Compute any messages which should be displayed after upgrade.
(Queue Task Callback)
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
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.
Details
at line 41
bool
verifyPreDBstate($errors)
Verify DB state.
at line 56
setPreUpgradeMessage($preUpgradeMessage, string $rev, null $currentVer = NULL)
Compute any messages which should be displayed before upgrade.
Note: This function is called iteratively for each upcoming revision to the database.
at line 67
setPostUpgradeMessage(string $postUpgradeMessage, string $rev)
Compute any messages which should be displayed after upgrade.
at line 78
static bool
runSql( $ctx, string $rev)
(Queue Task Callback)
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.
at line 121
static bool
removePaymentProcessorType( $ctx, string $name)
Remove a payment processor if not in use
at line 140
static bool
checkFKExists(string $table_name, string $constraint_name)
at line 153
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
at line 175
static bool
dropColumn(CRM_Queue_TaskContext $ctx, string $table, string $column)
Drop a column from a table if it exist.
at line 191
static bool
addIndex(CRM_Queue_TaskContext $ctx, string $table, string|array $column)
Add a index to a table column.
at line 206
static bool
dropIndex(CRM_Queue_TaskContext $ctx, string $table, string $indexName)
Drop a index from a table if it exist.