On clean install the files table don't get updated. Moved the db_add_field function from update to install.

Comments

sirkitree’s picture

Category: task » bug
Status: Active » Needs review
StatusFileSize
new1.82 KB

Thanks for calling my attention to this. I've taken it a step further to remove the field in the uninstall hook as well. Appreciate a test before I commit if you please.

jdwfly’s picture

Status: Needs review » Reviewed & tested by the community

For those who come upon this like I did the error will look like this after you submit a node with an flickr_imagefield:

user warning: Unknown column 'flickr_imagefield_location' in 'field list' query: UPDATE files SET flickr_imagefield_location = 5078508711 WHERE fid = 4 in /srv/web/joe/sites/all/modules/flickr_imagefield/flickr_imagefield.module on line 195.

This patch applys clean and it does add the field on a clean install of the module. I double-checked the database and the field was in the files table. RTBC?

sirkitree’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.