User:Woozle/Friendica/2017 upgrade

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< User:Woozle‎ | Friendica
Revision as of 19:32, 8 April 2017 by Woozle (talk | contribs) (/notify)
Jump to navigation Jump to search

This isn't a complete description of everything I had to do in order to get the latest Friendica working with my existing data, but it shows how I solved some of the more thorny problems.

Table Modifications

  • /contact - this is the first one I did, so notes are more explanatory
  • /item - this was a large table, and took a lot of time to do the copy
  • /gcontact
  • /notify

Other Changes

acl_selectors

This SQL:<mysql>SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`contact-id` SEPARATOR ',') AS uids FROM `group` INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid` WHERE NOT `group`.`deleted` AND `group`.`uid` = 1

GROUP BY `group`.`name` ORDER BY `group`.`name` LIMIT 0,100</mysql> ...returned the following error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'icms-fka.group.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by.

Finding where this was being generated required the use of grep:<bash>grep -r "GROUP BY \`group\`.\`name\`" *.php</bash>Note that the -r option doesn't actually seem to work; I had to run this inside the "includes" folder to identify the file -- which turned out to be acl_selectors.php line 505, which I have modified thusly:<mysql>GROUP BY `group`.`name`, `group`.`id`</mysql>