View Full Version : SQL Error While Upgrading
freebase69
05-06-2005, 07:24 PM
I updated all the files, uploaded all the ones that need to go, ran the installer and it went great, then it ran to upgrade to a new version automatically like 4 times. All worked but the last one going from V3Beta to V3 Final. This is the error I am getting and I can't get past it:
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE `rpg_lottery` DROP `editing`
mysql error: Can't DROP 'editing'. Check that column/key exists
mysql error number: 1091
Any ideas?
Thanks
Revan
05-06-2005, 10:44 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=78632" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=78632</a>
freebase69
05-07-2005, 03:26 AM
I removed the DROP and editing from the code and it went past that part but now I get this error:
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE `user` ADD `inmonsterbattle` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'inmonsterbattle'
mysql error number: 1060
I dont quite understand what that guy did in the other post but I tried to follow along as best as I could. Any other advice would be greatly appreciated.
RichieBoy67
05-07-2005, 03:32 AM
Do you have a link????
freebase69
05-07-2005, 04:26 AM
Link to what? My site? Currently it's turned off because these errors are causing errors with the entire site.
Revan
05-07-2005, 10:05 AM
Okay heres what to do:
* Remove the DROP from the upgrade file
* At the top of the file, before the first if(), place
$DB_site->reporterror = 0;
* At the bottom of the file, after the last if(), place
$DB_site->reporterror = 1;
* Open vB Options, and save them.
* Run the upgrade again.
freebase69
05-07-2005, 09:15 PM
Im still not having any luck. This is what I did:
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$DB_site->reporterror = 0;
if ($current_version < $script_version)
{
$DB_site->query("ALTER TABLE `" . TABLE_PREFIX . "rpg_lottery`");
if ($RPG_UPGRADE_DONE === true)
{
$DB_site->query("
UPDATE `" . TABLE_PREFIX . "setting` SET
value = '" . intval($script_version) . "',
defaultvalue = '" . intval($script_version) . "'
WHERE varname = '" . addslashes('rpg_versionnumber') . "'
");
print_description_row('Updated Setting: <b><i>Version Number</i></b>');
}
}
$DB_site->reporterror = 1;
/*================================================= =====================*\
When I run it like this I get this error:
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE `user` ADD `inmonsterbattle` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'inmonsterbattle'
mysql error number: 1060
freebase69
05-09-2005, 09:30 PM
I've removed my vBulletin and all the previously installed hacks. I am going to do a fresh install and try this again without importing threads/users/etc/etc.
Maybe something got messed up in that process because I'm out of ideas. I should have it back up sometime tonight and hopefully it will work.
congpine
06-05-2005, 10:02 PM
hey guys .. i got the same problems as you did ...T_T .
if ($RPG_UPGRADE_DONE === true)
$DB_site->reporterror = 1;
{
$DB_site->query("
UPDATE `" . TABLE_PREFIX . "setting` SET
value = '" . intval($script_version) . "',
defaultvalue = '" . intval($script_version) . "'
WHERE varname = '" . addslashes('rpg_versionnumber') . "'
");
print_description_row('Updated Setting: <b><i>Version Number</i></b>');
}
}
anyone help ? i do a fresh install so i think you will meet that problem again , so DON'T REMOVE YOUR BOARD
Durtay
06-05-2005, 11:53 PM
I updated all the files, uploaded all the ones that need to go, ran the installer and it went great, then it ran to upgrade to a new version automatically like 4 times. All worked but the last one going from V3Beta to V3 Final. This is the error I am getting and I can't get past it:
Database error in vBulletin 3.0.7:
Invalid SQL: ALTER TABLE `rpg_lottery` DROP `editing`
mysql error: Can't DROP 'editing'. Check that column/key exists
mysql error number: 1091
Any ideas?
Thanks
I came across these problems also... this is how you get around them. If you have phpmyadmin access...
First go into the 'rpg_lottery' table and add an empty column titled "editing", just set all stats to 0.
Once thats created go into the 'user' table and remove the column titled "inmonsterbattle"...
re-do the upgrade install, it will finish correctly.
ALTER TABLE `rpg_lottery` ADD `editing` VARCHAR( 00 ) NOT NULL ;
ALTER TABLE `user` DROP `inmonsterbattle`
theres the sql coding to do that without phpmyadmin
congpine
06-06-2005, 05:54 AM
oh it is cool , man ! thank you so much , i will try it now.......
YEAH ! thank you ! I 've done it ! it's cool ! thank you so much !
pmay68
06-11-2005, 06:04 PM
Thanks alot for this...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.