PDA

View Full Version : Need an ALTER statement ...


TurboFC3S
Mon 3rd Nov '03, 12:40pm
Can somebody give me the ALTER statement I need to create the usergroupid column? Here's how I know it's that. When I try to send a password through the admin panel, I get

<!-- Database error in vBulletin 2.3.2:

Invalid SQL:
INSERT INTO useractivation
(useractivationid, userid, dateline, activationid, type, usergroupid)
VALUES
(NULL, 1, 1067876471, '70040540', 1, 6)

mysql error: Unknown column 'usergroupid' in 'field list'

mysql error number: 1054

Date: Monday 03rd of November 2003 11:21:11 AM
Script: (Link: http://www.rx7club.com/member.php)http://www.rx7club.com/member.php
Referer:
-->

Here's the schema, no usergroupid column to be found

+------------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+----------------------+------+-----+---------+----------------+
| useractivationid | int(10) unsigned | | PRI | NULL | auto_increment |
| userid | int(10) unsigned | | MUL | 0 | |
| dateline | int(10) unsigned | | | 0 | |
| activationid | char(20) | | | | |
| type | smallint(5) unsigned | | | 0 | |
+------------------+----------------------+------+-----+---------+----------------+

TurboFC3S
Mon 3rd Nov '03, 6:38pm
Maybe I need to open a support ticket for this ...

Steve Machol
Mon 3rd Nov '03, 7:13pm
This error means you uploade the vB 2.3.2 files but never ran the appropriate upgrade scripts. The necessary query as per upgrade23.php (which should have been run when upgrading) is:

ALTER TABLE useractivation ADD usergroupid SMALLINT UNSIGNED NOT NULL

TurboFC3S
Tue 4th Nov '03, 3:57pm
Hmmm, I know I ran them (at least I thought so). Should I just re-run upgrade23?

Steve Machol
Tue 4th Nov '03, 4:06pm
Try running that query first. It occurs to me that perhaps your db user does not have ALTER permissions (in which case you should have gotten an error when running upgrade23.php.)

TurboFC3S
Tue 4th Nov '03, 9:57pm
Thanks Steve, ran that alter and looks like things are good now ... appreciate the help!