65 $exists = $select->subquery(
'entity_relationships',
'r2');
67 ->where($select->compare(
'r1.guid_one',
'=',
'r2.guid_one'))
68 ->andWhere($select->compare(
'r1.guid_two',
'=',
'r2.guid_two'))
69 ->andWhere($select->compare(
'r2.relationship',
'=',
"{$relationship_prefix}:{$method}",
ELGG_VALUE_STRING));
73 ->where($select->compare(
'r1.relationship',
'=',
"{$relationship_prefix}{$method}",
ELGG_VALUE_STRING))
75 ->andWhere($select->compare(null,
'not exists', $exists->getSQL()));
78 return (
int) $row->id;
83 $update->set(
'relationship', $update->param(
"{$relationship_prefix}:{$method}",
ELGG_VALUE_STRING))
84 ->where($update->compare(
'relationship',
'=',
"{$relationship_prefix}{$method}",
ELGG_VALUE_STRING))
85 ->andWhere($update->compare(
'id',
'in', $ids,
ELGG_VALUE_ID));
115 'callback' =>
function($row) {
116 return (
int) $row->guid;
122 $old_relationships = [];
static table($table, $alias=null)
{}
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)
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_count_entities(array $options=[])
Returns a count of entities.
compare($x, $comparison, $y=null, $type=null, $case_sensitive=null)
Build value comparison clause.
Result of a single BatchUpgrade run.
static fromTable($table, $alias=null)
{}
$guids
Activates all specified installed and inactive plugins.
_elgg_services()
Get the global service provider.
Migrate the notification subscription relationship to a new naming convention.
joinRelationshipTable($from_alias= '', $from_column= 'guid', $name=null, $inverse=false, $join_type= 'inner', $joined_alias=null)
Join relationship table from alias and return joined table alias.
Class to extend for asynchronous upgrades, i.e.
static fromTable($table, $alias=null)
{}
const RELATIONSHIP_PREFIX