My b2evolution Version: 0.9.x
I have been very happy with 0.9.2 up to now but due to heavy spamming that I need to manually delete every weekend I have decided to upgrade to 1.10.03.
I did try to upgrade in the past but had some problems with the following issue: http://forums.b2evolution.net/viewtopic.php?t=10133 and finally reverted to 0.9.2. At that time I think I messed up with the restore of my database and this could be the origin of the upgrade problem I will describe below.
I uploaded all the files to a directory \blogs_new then renamed my existing directory to \blogs_old and renamed \blogs_new to \blogs.
Then I launched the installation script and updated the basic configuration settings as requested and chose the upgrade option (not a clean install).
I then get the following error message:
Upgrading data in existing b2evolution database
Checking DB schema version... 8066 : OK.
Dropping old Hitlog table... OK.
Creating table for active sessions...
An unexpected error has occured!
If this error persits, please report it to the administrator.
Go back to home page
Additional information about this error:
MySQL error!
Table 'evo_sessions' already exists(Errno=1050)
Your query:
CREATE TABLE evo_sessions (
sess_ID INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
sess_key CHAR(32) NULL,
sess_lastseen DATETIME NOT NULL,
sess_ipaddress VARCHAR(15) NOT NULL DEFAULT '',
sess_user_ID INT(10) DEFAULT NULL,
sess_agnt_ID INT UNSIGNED NULL,
sess_data TEXT DEFAULT NULL,
PRIMARY KEY( sess_ID )
)
I tried to manually drop the table evo_sessions but get a lot of other error messages with tables already existing. In the end, I used the following script to delete all the already existing tables as they showed up:
DROP TABLE IF EXISTS `evo_sessions`;
DROP TABLE IF EXISTS `evo_usersettings`;
DROP TABLE IF EXISTS `evo_plugins`;
DROP TABLE IF EXISTS `evo_poststatuses`;
DROP TABLE IF EXISTS `evo_posttypes`;
DROP TABLE IF EXISTS `evo_files`;
DROP TABLE IF EXISTS `evo_basedomains`;
DROP TABLE IF EXISTS `evo_useragents`;
DROP TABLE IF EXISTS `evo_subscriptions`;
DROP TABLE IF EXISTS `evo_bloggroups`;
DROP TABLE IF EXISTS `evo_links`;
But still cannot succeed. The last error message I now get is:
Upgrading data in existing b2evolution database
Checking DB schema version... 8066 : OK.
Dropping old Hitlog table... OK.
Creating table for active sessions... OK.
Creating user settings table... OK.
Creating plugins table... OK.
Creating table for Post Statuses... OK.
Creating table for Post Types... OK.
Creating table for File Meta Data... OK.
Creating table for base domains... OK.
Creating table for user agents... OK.
Creating table for Hit-Logs... OK.
Creating table for subscriptions... OK.
Creating table for blog-group permissions... OK.
Upgrading blogs table...
An unexpected error has occured!
If this error persits, please report it to the administrator.
Go back to home page
Additional information about this error:
MySQL error!
Can't DROP 'blog_stub'; check that column/key exists(Errno=1091)
Your query:
ALTER TABLE evo_blogs
MODIFY COLUMN blog_ID int(11) unsigned NOT NULL auto_increment,
MODIFY COLUMN blog_links_blog_ID INT(11) NULL DEFAULT NULL,
CHANGE COLUMN blog_stub blog_urlname VARCHAR(255) NOT NULL DEFAULT 'urlname',
ADD COLUMN blog_allowcomments VARCHAR(20) NOT NULL default 'post_by_post' AFTER blog_keywords,
ADD COLUMN blog_allowblogcss TINYINT(1) NOT NULL default 1 AFTER blog_allowpingbacks,
ADD COLUMN blog_allowusercss TINYINT(1) NOT NULL default 1 AFTER blog_allowblogcss,
ADD COLUMN blog_stub VARCHAR(255) NOT NULL DEFAULT 'stub' AFTER blog_staticfilename,
ADD COLUMN blog_commentsexpire INT(4) NOT NULL DEFAULT 0 AFTER blog_links_blog_ID,
ADD COLUMN blog_media_location ENUM( 'default', 'subdir', 'custom', 'none' ) DEFAULT 'default' NOT NULL AFTER blog_commentsexpire,
ADD COLUMN blog_media_subdir VARCHAR( 255 ) NOT NULL AFTER blog_media_location,
ADD COLUMN blog_media_fullpath VARCHAR( 255 ) NOT NULL AFTER blog_media_subdir,
ADD COLUMN blog_media_url VARCHAR(255) NOT NULL AFTER blog_media_fullpath,
DROP INDEX blog_stub,
ADD UNIQUE blog_urlname ( blog_urlname )
I'm now stuck...
I have the impression that my database is corrupted due to failed earlier upgrade and a restore that was not clean but I do not have any cleaner backup copy.
How can I upgrade to 1.10.03 clean? I am willing to do some manual work to get this done if somebody will tell me how to. Maybe a clean install would be a solution but I would like to keep all my existing posts so maybe there is an export / import function for this.
Thanks
You really sound like you have one screwed up database :P
Probably the best thing you could do is restore your 0.9.ancient database and compare it's schema to a fresh 0.9.x installs database, delete any fields/tables that aren't part of a normal 0.9.x and then try an upgrade.
Of course you'd do this all locally or on a backup domain or summat ... otherwise you could end up with two screwed up installs and only a blonde to blame ;)
¥