68 ->where($select->compare(
"{$select->getTableAlias()}.guid_one",
'=',
"{$exists->getTableAlias()}.guid_one"))
69 ->andWhere($select->compare(
"{$select->getTableAlias()}.guid_two",
'=',
"{$exists->getTableAlias()}.guid_two"))
70 ->andWhere($select->compare(
"{$exists->getTableAlias()}.relationship",
'=',
"{$relationship_prefix}:{$method}",
ELGG_VALUE_STRING));
74 ->where($select->compare(
"{$select->getTableAlias()}.relationship",
'=',
"{$relationship_prefix}{$method}",
ELGG_VALUE_STRING))
76 ->andWhere(
"NOT EXISTS ({$exists->getSQL()})");
79 return (
int) $row->id;
84 $update->set(
'relationship', $update->param(
"{$relationship_prefix}:{$method}",
ELGG_VALUE_STRING))
85 ->where($update->compare(
'relationship',
'=',
"{$relationship_prefix}{$method}",
ELGG_VALUE_STRING))
86 ->andWhere($update->compare(
'id',
'in', $ids,
ELGG_VALUE_ID));
116 'callback' =>
function($row) {
117 return (
int) $row->guid;
123 $old_relationships = [];
static table(string $table)
Returns a QueryBuilder for updating data in a given table.
getEntityGUIDOptions(array $options=[])
Get options for entity guid selection.
Database abstraction query builder.
addSuccesses(int $num=1)
Set an item (or items) as successfully upgraded.
run(Result $result, $offset)
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
compare(string $x, string $comparison, $y=null, string $type=null, bool $case_sensitive=null)
Build value comparison clause.
elgg_count_entities(array $options=[])
Returns a count of entities.
static fromTable(string $table)
Returns a QueryBuilder for deleting data from a given table.
Result of a single BatchUpgrade run.
joinRelationshipTable(string $from_alias= '', string $from_column= 'guid', $name=null, bool $inverse=false,?string $join_type= 'inner', string $joined_alias=null)
Join relationship table from alias and return joined table alias.
$guids
Activates all specified installed and inactive plugins.
static fromTable(string $table, string $alias=null)
Returns a QueryBuilder for selecting data from a given table.
_elgg_services()
Get the global service provider.
Migrate the notification subscription relationship to a new naming convention.
Class to extend for asynchronous upgrades, i.e.
const RELATIONSHIP_PREFIX