PDA

View Full Version : vBulletin Database Question



Garland
08-05-2008, 10:21 AM
A sector of the database for my FFXI forums has corrupted. Specifically, the table "Picture". Repair attempts always fail. I'm wondering if anyone knows a way to reset a table back to default settings? I'd prefer not to restart the forums from scratch, though I did backup my database in every table but the problem table. This crash comes at a bad time as my prior database backup was lost with computer problems, and murphy's law screwed me. Any suggestions would be appreciated.

Samuraid
08-06-2008, 12:03 AM
Welcome to the fragile world of MyISAM tables. :(
You can always drop the table then create it again using the database schema vbulletin uses.


DROP TABLE IF EXISTS `picture`;
CREATE TABLE IF NOT EXISTS `picture` (
`pictureid` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`caption` text,
`extension` varchar(20) character set latin1 collate latin1_bin NOT NULL default '',
`filedata` mediumblob,
`filesize` int(10) unsigned NOT NULL default '0',
`width` smallint(5) unsigned NOT NULL default '0',
`height` smallint(5) unsigned NOT NULL default '0',
`thumbnail` mediumblob,
`thumbnail_filesize` int(10) unsigned NOT NULL default '0',
`thumbnail_width` smallint(5) unsigned NOT NULL default '0',
`thumbnail_height` smallint(5) unsigned NOT NULL default '0',
`thumbnail_dateline` int(10) unsigned NOT NULL default '0',
`idhash` varchar(32) NOT NULL default '',
`reportthreadid` int(10) unsigned NOT NULL default '0',
`state` enum('visible','moderation') NOT NULL default 'visible',
PRIMARY KEY (`pictureid`),
KEY `userid` (`userid`)
) ENGINE=MyISAM;
Note: This is a vBulletin 3.7.2 PL1 schema, as far as I know.
Hope this helps.

EDIT: Assuming you recreate this picture table from scratch, you should also truncate (empty) the following tables as well: albumpicture, picturecomment, picturecomment_hash