Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » Broke TXP

#1 2008-08-20 21:05:24

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Broke TXP

Okies I was cleaning out my DB, and thought only tables starting with txp_ were relevant, I accidently deleted two tables starting with textpattern.

And now I get the following error: http://www.simplecandy.com/textpattern/

The site works, but I can’t access my admin, how do I fix this? Basically I need to recreate these two tables, and fill them with the correct info right? Do you have a SQL command/code I can use to do this? Thanks. x


~ Cameron

Offline

#2 2008-08-20 21:19:56

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Broke TXP

You’ve deleted the table that contains articles, which for most TXP powered websites is the most important table of all. Do you have a backup?

Offline

#3 2008-08-20 21:22:27

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Broke TXP

Well Actually I’ve not done any articles yet, sooooo it’s not that big a deal, I just need to get those tables back
x


~ Cameron

Offline

#4 2008-08-20 21:28:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Broke TXP

The simplest way is to backup the current TXP tables, delete them on the server, delete the config.php file, run the setup scripts again (reinstall TXP if needed), log in on the admin side of TXP, then restore the backup tables.

Offline

#5 2008-08-20 21:31:05

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Broke TXP

eugh i really dont want to do that, is their not a simple way of just creating those two tables again using SQL, i mean i dont need to stick any content in them


~ Cameron

Offline

#6 2008-08-20 21:36:11

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Broke TXP

Sure, but it’s not as much fun:

CREATE TABLE `textpattern` (
  `ID` int(11) NOT NULL auto_increment,
  `Posted` datetime NOT NULL default '0000-00-00 00:00:00',
  `AuthorID` varchar(64) NOT NULL default '',
  `LastMod` datetime NOT NULL default '0000-00-00 00:00:00',
  `LastModID` varchar(64) NOT NULL default '',
  `Title` varchar(255) NOT NULL default '',
  `Title_html` varchar(255) NOT NULL default '',
  `Body` mediumtext NOT NULL,
  `Body_html` mediumtext NOT NULL,
  `Excerpt` text NOT NULL,
  `Excerpt_html` mediumtext NOT NULL,
  `Image` varchar(255) NOT NULL default '',
  `Category1` varchar(128) NOT NULL default '',
  `Category2` varchar(128) NOT NULL default '',
  `Annotate` int(2) NOT NULL default '0',
  `AnnotateInvite` varchar(255) NOT NULL default '',
  `comments_count` int(8) NOT NULL default '0',
  `Status` int(2) NOT NULL default '4',
  `textile_body` int(2) NOT NULL default '1',
  `textile_excerpt` int(2) NOT NULL default '1',
  `Section` varchar(64) NOT NULL default '',
  `override_form` varchar(255) NOT NULL default '',
  `Keywords` varchar(255) NOT NULL default '',
  `url_title` varchar(255) NOT NULL default '',
  `custom_1` varchar(255) NOT NULL default '',
  `custom_2` varchar(255) NOT NULL default '',
  `custom_3` varchar(255) NOT NULL default '',
  `custom_4` varchar(255) NOT NULL default '',
  `custom_5` varchar(255) NOT NULL default '',
  `custom_6` varchar(255) NOT NULL default '',
  `custom_7` varchar(255) NOT NULL default '',
  `custom_8` varchar(255) NOT NULL default '',
  `custom_9` varchar(255) NOT NULL default '',
  `custom_10` varchar(255) NOT NULL default '',
  `uid` varchar(32) NOT NULL default '',
  `feed_time` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`ID`),
  KEY `Posted` (`Posted`),
  KEY `categories_idx` (`Category1`(10),`Category2`(10)),
  KEY `section_status_idx` (`Section`),
  FULLTEXT KEY `searching` (`Title`,`Body`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

Offline

#7 2008-08-20 21:39:34

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Broke TXP

THANKS :)

How do you mean it’s not as much as fun though? x


~ Cameron

Offline

  1. Index
  2. » How do I…?
  3. » Broke TXP

Board footer

Powered by FluxBB