![Rolling Eyes :roll:](/web/20090322133833im_/http://forum.phpwcms.org/images/smilies/icon_rolleyes.gif)
![Wink :wink:](/web/20090322133833im_/http://forum.phpwcms.org/images/smilies/icon_wink.gif)
While having a day off, I was trying to upgrade on a test copy of my [url]iroutier.com[/url] site (version 1.3.3) to the lastest snapshot (1.5 r115)
I ran in some SQL disparencies. To validate the bug, I installed a fresh 1.3.3 version an tried to run an upgrade to 1.5 r115.
Here's the SQL errors I got:
19__1.3.3_to_1.3.4.sql OK
19__1.3.4_to_1.3.5.sql
ERROR: Duplicate column name 'acat_overwrite' -> ALTER TABLE `phpwcms_articlecat` ADD `acat_overwrite` VARCHAR( 255 ) NOT NULL;
ERROR: Duplicate column name 'acontent_paginate_page' -> ALTER TABLE `phpwcms_articlecontent` ADD `acontent_paginate_page` INT( 5 ) UNSIGNED NOT NULL;
ERROR: Duplicate column name 'acontent_paginate_title' -> ALTER TABLE `phpwcms_articlecontent` ADD `acontent_paginate_title` VARCHAR( 255 ) NOT NULL;
ALTER TABLE `phpwcms_articlecontent` ADD INDEX ( `acontent_paginate_page` );
20__1.3.5_to_1.3.5.1.sql
ERROR: Table '133r115.phpwcms_categories' doesn't exist -> ALTER TABLE `phpwcms_categories` ADD `cat_pid` INT( 11 ) NOT NULL AFTER `cat_type`;
ERROR: Table '133r115.phpwcms_categories' doesn't exist -> ALTER TABLE `phpwcms_categories` ADD INDEX ( `cat_pid` );
ERROR: Table 'phpwcms_log' already exists -> CREATE TABLE `phpwcms_log` (
`log_id` int(11) NOT NULL auto_increment,
`log_type` varchar(255) NOT NULL,
`log_timestamp` timestamp NOT NULL,
`log_message` text NOT NULL,
`log_ip` varchar(50) NOT NULL,
`log_userid` varchar(255) NOT NULL,
PRIMARY KEY (`log_id`)
) TYPE=MyISAM;
ALTER TABLE `phpwcms_guestbook` CHANGE `guestbook_created` `guestbook_created` INT(11) NOT NULL;
ALTER TABLE `phpwcms_userlog` CHANGE `logged_change` `logged_change` INT(11) DEFAULT '0' NOT NULL;
ALTER TABLE `phpwcms_userlog` CHANGE `logged_start` `logged_start` INT(11) DEFAULT '0' NOT NULL;
ALTER TABLE `phpwcms_articlecat` CHANGE `acat_alias` `acat_alias` VARCHAR(255) NOT NULL;
ALTER TABLE `phpwcms_articlecat` DROP INDEX `acat_alias`, ADD INDEX `acat_alias` (`acat_alias`);
ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `phpwcms_file` DROP INDEX `f_shortinfo`, ADD INDEX `f_shortinfo` (`f' at line 2 -> ALTER TABLE `phpwcms_file` DROP INDEX `f_name`, ADD INDEX `f_name` (`f_name`)
ALTER TABLE `phpwcms_file` DROP INDEX `f_shortinfo`, ADD INDEX `f_shortinfo` (`f_shortinfo`);
21__1.3.5_to_1.5.sql
ALTER TABLE `phpwcms_articlecat` ADD `acat_archive` INT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_articlecat` ADD INDEX ( `acat_archive` );
ALTER TABLE `phpwcms_article` ADD `article_archive_status` INT( 1 ) NOT NULL DEFAULT '1';
ALTER TABLE `phpwcms_article` ADD INDEX ( `article_archive_status` );
ALTER TABLE `phpwcms_articlecontent` ADD `acontent_category` VARCHAR( 255 ) NOT NULL;
ALTER TABLE `phpwcms_file` CHANGE `f_cat` `f_cat` VARCHAR( 255 ) NOT NULL;
ALTER TABLE `phpwcms_file` CHANGE `f_changed` `f_changed` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_file` CHANGE `f_created` `f_created` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_file` DROP `f_log`;
ALTER TABLE `phpwcms_file` CHANGE `f_longinfo` `f_longinfo` TEXT NOT NULL;
ALTER TABLE `phpwcms_file` ADD `f_copyright` VARCHAR( 255 ) NOT NULL;
ALTER TABLE `phpwcms_file` ADD `f_tags` VARCHAR( 255 ) NOT NULL;
ALTER TABLE `phpwcms_file` CHANGE `f_size` `f_size` INT( 15 ) UNSIGNED NOT NULL DEFAULT '0';
ERROR: Table '133r115.phpwcms_calendar' doesn't exist -> ALTER TABLE `phpwcms_calendar` ADD `calendar_lang` VARCHAR( 255 ) NOT NULL;
ERROR: Table '133r115.phpwcms_calendar' doesn't exist -> ALTER TABLE `phpwcms_calendar` ADD INDEX ( `calendar_lang` );
ALTER TABLE `phpwcms_file` ADD `f_granted` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_file` ADD INDEX ( `f_granted` );
ALTER TABLE `phpwcms_articlecontent` ADD `acontent_granted` INT NOT NULL DEFAULT '0';
ALTER TABLE `phpwcms_articlecontent` ADD INDEX ( `acontent_granted` );
ERROR: Table '133r115.phpwcms_calendar' doesn't exist -> ALTER TABLE `phpwcms_calendar` ADD `calendar_teaser` TEXT NOT NULL AFTER `calendar_where`;
Hope this may help Oliver to pinpoint/fix the SQL for upcoming versions so we can easily catch up on his work…
Cheers,
Yves