Hi,
when upgrading through Drush, I'm getting several different SQL errors on different sites; the upgrade to 6.x-2.0-alpha1 runs almost never smoothly:
WD php: Unknown column 'module' in 'where clause' [error]
query: UPDATE xmlsitemap set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' in
/var/www/drupal1/sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install on line 275.
UPDATE {xmlsitemap} set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' [error]
(...)
An error occurred at function : drush_core_updatedb [error]
and:
WD php: Unknown column 'module' in 'where clause' [error]
query: UPDATE xmlsitemap set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' in
/var/www/drupal2/sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install on line 275.
UPDATE {xmlsitemap} set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' [error]
Unknown column 'module' in 'where clause' [error]
query: UPDATE xmlsitemap set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' in
/var/www/drupal2/sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install on line 275.
Running 'drush updatedb' a second time claims to finish correctly:
# drush updatedb
No database updates required [success]
Finished performing updates.
However, I'm not sure if the errors are corrected in the second run, or if they are even noteworthy. Also I'd like to add that I don't know if this is rather an Drush or an Xmlsitemap problem, so feel free to move this report to a more appropriate issue queue. However, when running update.php on a third site, I got partilly similar errors at ./update.php?op=results:
(red)
user warning: Unknown column 'module' in 'where clause' query: UPDATE xmlsitemap set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term' in /var/www/drupal3/sites/all/modules/xmlsitemap/xmlsitemap_taxonomy/xmlsitemap_taxonomy.install on line 275.
(grey)
The following queries were executed
(...)
Update #6113
Failed: UPDATE {xmlsitemap} set module = 'xmlsitemap_taxonomy' WHERE module = 'xmlsitemap_term'
Thanks & greetings, -asb
Comments
Comment #1
dave reidThose are updates that are not in the 2.x files, so it seems you have old module files around somewhere. Make sure you delete the module's folder before copying in the new version.
Comment #2
asb commentedDrush is supposed to (a) move the updated module's folder to ./backup/modules, then (b) download and extract the new release and (c) run
drush updatedbwhich should be an aequivalent to runningupdate.php.If Drush is working as it is supposed to, there is nothing to be deleted manually.
What I'm seeing in ./backup/modules after the upgrade from 6th of February is:
So obviously there's no 20100206xxxx folder being created. However, I have been upgrading from XML sitemap 6.x-2.0-unstable6, and I have run
drush updatedbmultiple times, most probably also several times update.php after installing XML sitemap 6.x-2.0-unstable6.What I'm getting as available releases through Drush is:
If I'm having a site with XML sitemap 6.x-2.0-unstable6 installed, and am running
drush rfanddrush up, XML sitemap [xmlsitemap-6.x-2.0-alpha1] is being suggested by Drush as an available update.If those updates are not in the 2.x files, I don't know what is happening here, sorry.
Greetings, -asb
Comment #3
dave reidYeah, I'm not sure what to say beside that I know for a fact that the updates in 6.x-2.x would and do not run any kind of update like that. The xmlsitemap_term module was renamed to xmlsitemap_taxonomy in 6.x-1.x and eventually removed, but we don't have any module column in {xmlsitemap} with 6.x-2.x.
Comment #4
asb commentedHi Dave,
thanks for your reply - you're the maintainer and you for sure do know what updates 'xmlsitemap' is running when upgraded. So for now exclude 'XML sitemap' as source of these errors (btw, do they indicate something harmful?)
From my end I can summarize:
drush updatecodeat least 1-2 times a week; thus I'm pretty sure that there are no pending databases updates (everything assuming that Drush is working correctly; in some cases we know that Drush doesn't do proper database updates)drush rf(refreshs the list of releases) plusdrush up(update, installs module updates); if Drush executes database updates, I'm always running an additionaldrush updatecode(a rough, but not complete aequivalent for running update.php). If errors are reported, I'm logging into the site as user #1 and run update.php manually, as long as no errors are indicated anymore; if SQL errors persists, I'm posting an issue (similar to this one).drush up), the rest was updated by runningdrush dl xmlsitemap(which automatically updates from 6.x-2.0-unstable6 to 6.x-2.0-alpha1) because other updates were causing problems (Panels/Ctools). As far as I can see from the watchdog reports, the approach did not affect if these SQL errors showed up.So I'd suggest to move this issue from the 'XML sitemap' queue to the 'Drush' issue queue. Adjusting project, version, component and issue title accordingly.
Thanks & greetings,
-asb
Comment #5
dave reid@asb Can you double check which versions of all the XML sitemap modules you're seeing on your admin/build/modules page?
Comment #6
asb commented@David Reid:
Searching for "xml sitemap" on ./admin/build/modules gives me on one site:
On another site it gets more interesiting, indeed:
Something is absolutely not working as it should.
Repeating the manual upgrade procedure:
No errors.
Now I have on ./admin/build/modules:
In ./sites/all/modules/xmlsitemap, I have:
In ./backup/modules, the last backup folder still is dating from 20100130024101.
So as it seems, Drush (a) does not back up the module's folder when updating a contributed module with something like
drush dl xmlsitemap-6.x-2.0-alpha1, and it does not cleanly replace the module's folder.When manually deleting the directory ./sites/all/modules/xmlsitemap, XML sitemap user 6.x-1.2 is gone from ./admin/build/modules. I'll check my other sites and report back later. Let's see if this behaviour of Drush is intended (this applies to drush.php from January 6th).
Edit: Upgraded to Drush "All-versions-3.0-alpha1" from 2010-Jan-26; it's the same behaviour: When dowing an
drush dl xmlsitemap-6.x-2.0-alpha1, no module folder's backup is created, so possibly the new version isn't replaced correctly, either.Greetings, -asb
Comment #7
asb commentedSide note: After finishing the steps described in #6, watchdog started to be flooded with warnings like:
Comment #8
moshe weitzman commentedi can't make heads or tails of these posts. please specify problems clearly and tersely.