Closed (fixed)
Project:
User Points
Version:
5.x-3.5
Component:
Other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 May 2008 at 18:39 UTC
Updated:
15 Jun 2008 at 04:11 UTC
The hook_install() function doesn't create the event field.
The function is supposed to be called when Drupal does not find any previous version of the module; in this case, if a user installs the 5.x-3.5 version, he will keep to get an error about an undefined field.
Comments
Comment #1
avpadernoThe field is not even added by any
hook_update_N()functions.I had to manually add the field using phpAdmin.
Comment #2
kbahey commentedActually, 'event' is now called 'operation'. update # 7 should have changed that for you.
If you have a contributed module that uses 'event', it should be ported to use the new field.
Comment #3
avpadernohook_update_N()implementations get called when the module is already registered in the Drupal{system}table, and drupal finds a new version of the module.hook_update_N()does not get called the first time the module is installed.In the specific case, the new field will not installed in a Drupal installation without any previous version of the module installed, if
hook_install()does not provide to create it.Comment #4
kbahey commentedI don't understand what you are talking about.
Do you have a patch that fixes whatever problem you are seeing?
Comment #5
avpadernoI spitted the issue in two (#265095: Table field get inconsistently named, #265097: hook_update_N() doesn't update any PostgreSQL tables).
On the intranet we use at work we have a web server using a PostgreSQL database, and I had a problem after installing the version 5.x-3.5 of the module (which was not installed before).
I just noticed today that the database was not MySQL as I was wrongly supposing.
Comment #6
jredding commentedI just checked and tested it and hook_install does create both the mysql and postgres SQL tables correctly.
and you're correct almost none of the hook_update_* functions have postgres support. Most of the Queries should work just fine on mysql and postgres but for those that won't I updated to the postgres area.
As per a previous conversation the event field has been renamed to operation thus the original topic of the issue is incorrect.
Comment #7
jredding commentedComment #8
kbahey commentedOne final note: the use of PostgreSQL in all of Drupal is far less than MySQL, so do not expect that just reporting a PostgreSQL issue will get it fixed as quickly as MySQL.
If you want good support for PostgreSQL for a module, you have to put in the effort by creating and/or testing patches for it specifically.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.