Announcement

Collapse
No announcement yet.

Adding back a table after deletion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bjorkfan19
    replied
    Thanks.

    Leave a comment:


  • Steve Machol
    replied
    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) )

    Leave a comment:


  • Wayne Luke
    replied
    Originally posted by bjorkfan19
    MySQL said:
    You have an error in your SQL syntax near '' at line 1
    You need to add another ) at the very end.

    Leave a comment:


  • bjorkfan19
    replied
    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)
    MySQL said:
    You have an error in your SQL syntax near '' at line 1

    Leave a comment:


  • Steve Machol
    replied
    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)

    Leave a comment:


  • bjorkfan19
    started a topic Adding back a table after deletion

    Adding back a table after deletion

    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?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X