Helpful Information
 
 
Category: Premium Modifications
[HELP] Reimported users table, now getting database error for arcade

Hi, I had to reimport my users table because of an error I made. It was before I installed the arcade.

After the import, I get this error from the arcade page when trying to access it:
mySQL query error: SELECT userid, username, posts, arcade_ban, times_played, is_arcade_mod AS is_mod,
fav_games AS favs, user_sort, user_order, user_g_pp, user_s_pp, def_g_cat,
game_skin, arcade_mod_privs, arcade_pmactive,
usergroupid, membergroupids
FROM user
WHERE userid=1


mySQL error: Unknown column 'arcade_ban' in 'field list'


Obviously this is because the arcade tables aren't in the database - so how do I recreate them? I don't want to re-install my arcade because I have a lot of games/categories installed, and I don't want to lose them.

Also, I have vbPlaza installed too - will this be affected by the arcade errors?

Looking at the install code in the product xml file, I found the following additions are made to the user table (assuming you had the latest version installed):

$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_ban tinyint(1) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD times_played int(11) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD is_arcade_mod TINYINT( 1 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD fav_games TEXT NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_sort VARCHAR( 15 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_order VARCHAR( 4 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_g_pp MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD user_s_pp MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD def_g_cat MEDIUMINT( 8 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD game_skin TINYINT( 1 ) DEFAULT '0' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_mod_privs TEXT NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_pmactive tinyint(1) DEFAULT '1' NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD games_played int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD time_played int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_points int(11) NOT NULL default '500', ADD arcade_spent int(11) NOT NULL default '0', ADD arcade_won int(11) NOT NULL default '0', ADD arcade_high int(11) NOT NULL default '0'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD create_tourney tinyint(1) NOT NULL default '1'");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_sess_gid MEDIUMINT(8) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_sess_start INT(11) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_gtype INT(11) NOT NULL");
$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD arcade_session MEDIUMINT(8) NOT NULL");


so you could probably either find a way to execute that or else you could edit it into SQL queries pretty easily. Obviously all the data in those fields is gone.

I don't know whether or not that will fix everything, but it may be worth a shot.

Hallelujah! It worked out like a charm (had to modify each query to run, but it was worth it!)

Thanks KH99!










privacy (GDPR)