::NoName Magazine 无名杂志 » Project Parasy » sai 你好,我的为什么不能升级数据库?出错了.
本主题共有 6 条回复 | 回到顶部
#1 - 2007-7-30 12:13
Sai
桂林
使用下面这段sql语句试一试
CODE:
ALTER TABLE `cdb_forums` ADD `board_name` char(50) NOT NULL ;
ALTER TABLE `cdb_forums` ADD `idx_push` tinyint(1) NOT NULL default '0' ;
ALTER TABLE `cdb_favorites` ADD `dateline` int(10) NOT NULL;
CREATE TABLE `cdb_savepoint` (
`svp_id` int(10) unsigned NOT NULL auto_increment,
`svp_uid` int(10) unsigned NOT NULL default '0',
`svp_url` varchar(255) NOT NULL default '',
`svp_rank` int(10) unsigned NOT NULL default '0',
`svp_created` int(10) unsigned NOT NULL default '0',
`svp_lastupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`svp_id`),
KEY `INDEX_UID` (`svp_uid`),
KEY `INDEX_URL` (`svp_url`)
) ENGINE=MyISAM;
ALTER TABLE `cdb_forums` ADD `idx_push` tinyint(1) NOT NULL default '0' ;
ALTER TABLE `cdb_favorites` ADD `dateline` int(10) NOT NULL;
CREATE TABLE `cdb_savepoint` (
`svp_id` int(10) unsigned NOT NULL auto_increment,
`svp_uid` int(10) unsigned NOT NULL default '0',
`svp_url` varchar(255) NOT NULL default '',
`svp_rank` int(10) unsigned NOT NULL default '0',
`svp_created` int(10) unsigned NOT NULL default '0',
`svp_lastupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`svp_id`),
KEY `INDEX_UID` (`svp_uid`),
KEY `INDEX_URL` (`svp_url`)
) ENGINE=MyISAM;
#2 - 2007-7-30 12:17
怪鱼
地球
升级错误,MySQL 提示: Duplicate column name 'board_name' ,请返回。
我是在本地测试的,这跟本地服务器没关系吧?是不是我机子不支持?
我是在本地测试的,这跟本地服务器没关系吧?是不是我机子不支持?
#3 - 2007-7-30 12:23
Sai
桂林
跳过前面三段(已经执行过了),直接执行
CODE:
CREATE TABLE `cdb_savepoint` (
`svp_id` int(10) unsigned NOT NULL auto_increment,
`svp_uid` int(10) unsigned NOT NULL default '0',
`svp_url` varchar(255) NOT NULL default '',
`svp_rank` int(10) unsigned NOT NULL default '0',
`svp_created` int(10) unsigned NOT NULL default '0',
`svp_lastupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`svp_id`),
KEY `INDEX_UID` (`svp_uid`),
KEY `INDEX_URL` (`svp_url`)
) ENGINE=MyISAM;
`svp_id` int(10) unsigned NOT NULL auto_increment,
`svp_uid` int(10) unsigned NOT NULL default '0',
`svp_url` varchar(255) NOT NULL default '',
`svp_rank` int(10) unsigned NOT NULL default '0',
`svp_created` int(10) unsigned NOT NULL default '0',
`svp_lastupdated` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`svp_id`),
KEY `INDEX_UID` (`svp_uid`),
KEY `INDEX_URL` (`svp_url`)
) ENGINE=MyISAM;