update error beta1 -> beta2
| Project: | Flag Friend |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
i get this errors when trying to update from b1 to b2:
running update.php:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: ALTER TABLE flag_friend_message CHANGE fcid `fcid` INT auto_increment DEFAULT NULL, ADD in /var/www/htdocs/includes/database.mysql-common.inc on line 520.
The following queries were executed
flag_friend module
Update #6000
ALTER TABLE {flag_friend_message} DROP PRIMARY KEY
ALTER TABLE {flag_friend_message} DROP fcid
Failed: ALTER TABLE {flag_friend_message} CHANGE fcid `fcid` INT auto_increment DEFAULT NULL, ADD
and when accessing the module:
user warning: Unknown column 'flag_content_users__flag_friend_message.fcid' in 'on clause' query: SELECT DISTINCT(users.uid) AS uid, users.picture AS users_picture, users.name AS users_name, flag_content_users__flag_friend_message.message AS flag_content_users__flag_friend_message_message, flag_content.content_id AS flag_content_content_id, flag_friend.uid AS flag_friend_uid FROM users users INNER JOIN flag_content flag_content_users ON users.uid = flag_content_users.uid AND flag_content_users.fid = 2 LEFT JOIN flag_friend_message flag_content_users__flag_friend_message ON flag_content_users.fcid = flag_content_users__flag_friend_message.fcid LEFT JOIN flag_content flag_content ON users.uid = flag_content.content_id AND (flag_content.fid = 2 AND flag_content.uid = 3) LEFT JOIN flag_friend flag_friend ON users.uid = flag_friend.uid WHERE flag_content_users.content_id = 3 LIMIT 0, 10 in /modules/views/includes/view.inc on line 731.

#1
Here's a patch to fix this. Finally found a decent working example of the correct way to do this in system.install
From an install of BETA1, update to BETA2 and apply this patch. Then run update.php.
Sorry for the inconvenience.
#2
#3
ok, that worked.
Now running b2.
thx
#4
Ok, now that I know that works I guess I should put that into another update hook for beta3. Thanks for testing.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.