Closed (fixed)
Project:
Auto Assign Role
Version:
6.x-1.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2009 at 07:17 UTC
Updated:
31 Aug 2009 at 13:40 UTC
I get the following errors when updating the database after the Beta4 upgrade:
* user warning: Table 'databasemysite.autoassignrole_page' doesn't exist query: ALTER TABLE autoassignrole_page ADD menu VARCHAR(255) in /usr/local/apache2/vhosts/mysite.com/htdocs/sites/all/modules/autoassignrole/autoassignrole.install on line 156.
* user warning: Table 'databasemysite.autoassignrole_page' doesn't exist query: SELECT rid, path, display, title, weight, menu FROM autoassignrole_page in /usr/local/apache2/vhosts/mysite.com/htdocs/sites/all/modules/autoassignrole/autoassignrole.module on line 31.
Comments
Comment #1
13rac1 commentedCan you verify if the table autoassignrole_page exist or not in your database? Do you have a database table prefix set?
Comment #2
cyberswat commentedActually there isn't an update hook to move from beta to beta so the best approach is to completely uninstall the module and recreate it so that the database tables are created during the install.
Comment #3
gregarios commentedOk... well that explains why the new version seems to be working as well. Why should there be an error in the database update then?
Comment #4
cyberswat commentedThe only error you are likely to see would be something focusing on the statement "ALTER TABLE autoassignrole_page ADD menu VARCHAR(255)" ... you'll get an error if that field already exists. The update hook that does that was put in place in case you were already running a version that created the autoassignrole_page table. So if you did a clean install that statement will fail because the field already exists. Is this what you are seeing?
Comment #5
gregarios commentedI had been using Beta3.
I put the site in maintenance mode.
I then deleted the "autoassignrole" folder from the modules directory, and replaced it with the new Beta4 version of the "autoassignrole" folder.
Then, I went straight to the database update and ran it, getting the errors I listed.
I suppose if I'd tried to run the new module (not in maintenance mode) before updating the database (wrong procedure) then the table entry would have been installed there and I may not have gotten the error?
Comment #6
cyberswat commentedYou need to uninstall by navigating to the modules page. Disable the module. Click the uninstall tab. Select the auto assign role module and submit. Then enable the new code.
Comment #7
cyberswat commentedAdded update hooks to resolve this issue
http://drupal.org/cvs?commit=252054