1
MadFish
Problem with restoring a backup database
  • 2005/7/31 9:42

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


I'm trying to roll back a XOOPS install to 2.13a, but my database backup is generating an error when I try to restore it:

Quote:
#1170 - BLOB column 'hometext' used in key specification without a key length


Can anyone suggest how to fix this? The backup was made with XOOPS Backup and Restore 3.0. MySQL version 4.0.24

Query is below:

SQL-query:

CREATE TABLE xoops_stories(
storyid intunsigned NOT NULL AUTO_INCREMENT ,
uid intunsigned DEFAULT '0' NOT NULL ,
title varchar255 NOT NULL ,
created int10 unsigned DEFAULT '0' NOT NULL ,
published int10 unsigned DEFAULT '0' NOT NULL ,
expired int10 unsigned DEFAULT '0' NOT NULL ,
hostname varchar20 NOT NULL ,
nohtml tinyint) DEFAULT '0' NOT NULL ,
nosmiley tinyint) DEFAULT '0' NOT NULL ,
hometext text NOT NULL ,
bodytext text NOT NULL ,
counter intunsigned DEFAULT '0' NOT NULL ,
topicid smallintunsigned DEFAULT '1' NOT NULL ,
ihome tinyint) DEFAULT '0' NOT NULL ,
notifypub tinyint) DEFAULT '0' NOT NULL ,
story_type varcharNOT NULL ,
topicdisplay tinyint) DEFAULT '0' NOT NULL ,
topicalign char) DEFAULT 'R' NOT NULL ,
comments smallintunsigned DEFAULT '0' NOT NULL ,
rating double6) DEFAULT '0.0000' NOT NULL ,
votes int11 unsigned DEFAULT '0' NOT NULL ,
keywords varchar255 NOT NULL ,
description varchar255 NOT NULL ,
PRIMARY KEY storyid ) ,
KEY idxstoriestopictopicid ) ,
KEY ihomeihome ) ,
KEY uiduid ) ,
KEY published_ihomepublishedihome ) ,
KEY titletitle40 ) ) ,
KEY createdcreated ) ,
KEY searchtitlehometextbodytext )
)

2
jdseymour
Re: Problem with restoring a backup database

Try this one. I exported through phpmyadmin:

DROP TABLE IF EXISTS `xoops_stories`;
CREATE TABLE `xoops_stories` (
  `
storyidint(8unsigned NOT NULL auto_increment,
  `
uidint(5unsigned NOT NULL default '0',
  `
titlevarchar(255NOT NULL default '',
  `
createdint(10unsigned NOT NULL default '0',
  `
publishedint(10unsigned NOT NULL default '0',
  `
expiredint(10unsigned NOT NULL default '0',
  `
hostnamevarchar(20NOT NULL default '',
  `
nohtmltinyint(1NOT NULL default '0',
  `
nosmileytinyint(1NOT NULL default '0',
  `
hometexttext NOT NULL,
  `
bodytexttext NOT NULL,
  `
keywordsvarchar(255NOT NULL default '',
  `
descriptionvarchar(255NOT NULL default '',
  `
counterint(8unsigned NOT NULL default '0',
  `
topicidsmallint(4unsigned NOT NULL default '1',
  `
ihometinyint(1NOT NULL default '0',
  `
notifypubtinyint(1NOT NULL default '0',
  `
story_typevarchar(5NOT NULL default '',
  `
topicdisplaytinyint(1NOT NULL default '0',
  `
topicalignchar(1NOT NULL default 'R',
  `
commentssmallint(5unsigned NOT NULL default '0',
  `
ratingdouble(6,4NOT NULL default '0.0000',
  `
votesint(11unsigned NOT NULL default '0',
  
PRIMARY KEY  (`storyid`),
  
KEY `idxstoriestopic` (`topicid`),
  
KEY `ihome` (`ihome`),
  
KEY `uid` (`uid`),
  
KEY `published_ihome` (`published`,`ihome`),
  
KEY `title` (`title`(40)),
  
KEY `created` (`created`),
  
FULLTEXT KEY `search` (`title`,`hometext`,`bodytext`)
TYPE=MyISAM AUTO_INCREMENT=;


HTH.

3
MadFish
Re: Problem with restoring a backup database
  • 2005/7/31 10:35

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


Many thanks, that works (in that the table is created with no problems). I managed to fix the same problem in another module table by pulling out the original sql query from the module code.

Unfortunately, I now have a White Screen of Death Problem so something else is wrong...maybe the data (shudder) but I guess it's an improvement :)

Edit: WSOD was my fault - now got everything back except for the news index page...work continues!

Login

Who's Online

478 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 478


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits