I don't have manual access to my database at the moment (host mix-up), but recently had the attachments table deleted. This is preventing any threads from being viewed and I need to add it back to sate all the references to it. Is there a way to rebuild this through any of the vBulletin scripts?
Adding back a table after deletion
Collapse
X
-
Tags: None
-
I believe this query will recreate a new attachment table for you. Backup your database first.
CREATE TABLE attachment (
attachmentid smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
userid int(10) unsigned DEFAULT '0' NOT NULL,
dateline int(10) unsigned DEFAULT '0' NOT NULL,
filename varchar(100) NOT NULL,
filedata mediumtext NOT NULL,
visible smallint(5) unsigned DEFAULT '0' NOT NULL,
counter smallint(5) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (attachmentid)Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
-
Originally posted by Steve Machol
I believe this query will recreate a new attachment table for you. Backup your database first.
CREATE TABLE attachment (
attachmentid smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
userid int(10) unsigned DEFAULT '0' NOT NULL,
dateline int(10) unsigned DEFAULT '0' NOT NULL,
filename varchar(100) NOT NULL,
filedata mediumtext NOT NULL,
visible smallint(5) unsigned DEFAULT '0' NOT NULL,
counter smallint(5) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (attachmentid)
You have an error in your SQL syntax near '' at line 1Comment
-
Originally posted by bjorkfan19
MySQL said:
You have an error in your SQL syntax near '' at line 1Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Good catch Wayne!
Code:CREATE TABLE attachment ( attachmentid smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment, userid int(10) unsigned DEFAULT '0' NOT NULL, dateline int(10) unsigned DEFAULT '0' NOT NULL, filename varchar(100) NOT NULL, filedata mediumtext NOT NULL, visible smallint(5) unsigned DEFAULT '0' NOT NULL, counter smallint(5) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (attachmentid) )
Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
Change CKEditor Colors to Match Style (for 4.1.4 and above)
Steve Machol Photography
Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.
Comment
-
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment