1 seven_star Sep 14, 2009 23:06
3 seven_star Sep 16, 2009 07:19
will that not erase all my posts etc? I just want to update the version, not do a clean install.
4 laibcoms Sep 16, 2009 07:41
Nope, it won't delete your existing database.
Just be sure you select the "update" option ;)
5 yabba Sep 16, 2009 08:01
Take a backup of your files and database first huh? ;)
¥
6 seven_star Sep 16, 2009 08:51
I did a backup first and when i tried to do the upgrade, i get this
You have schema version 9950 but we would need 9700
so i deleted everything and restored my old version
7 seven_star Apr 19, 2010 09:39
I've updated my thread because I am running into issues updating from 2.4.7 to 3.3.3
I get this message when trying to update-
MySQL error!
Duplicate column name 'post_titletag'(Errno=1060)
Your query:
ALTER TABLE evo_items__item
CHANGE COLUMN post_urltitle post_urltitle VARCHAR(210) NULL DEFAULT NULL,
CHANGE COLUMN post_order post_order DOUBLE NULL,
ADD COLUMN post_titletag VARCHAR(255) NULL DEFAULT NULL AFTER post_urltitle,
ADD COLUMN post_double1 DOUBLE NULL COMMENT 'Custom double value 1' AFTER post_priority,
ADD COLUMN post_double2 DOUBLE NULL COMMENT 'Custom double value 2' AFTER post_double1,
ADD COLUMN post_double3 DOUBLE NULL COMMENT 'Custom double value 3' AFTER post_double2,
ADD COLUMN post_double4 DOUBLE NULL COMMENT 'Custom double value 4' AFTER post_double3,
ADD COLUMN post_double5 DOUBLE NULL COMMENT 'Custom double value 5' AFTER post_double4,
ADD COLUMN post_varchar1 VARCHAR(255) NULL COMMENT 'Custom varchar value 1' AFTER post_double5,
ADD COLUMN post_varchar2 VARCHAR(255) NULL COMMENT 'Custom varchar value 2' AFTER post_varchar1,
ADD COLUMN post_varchar3 VARCHAR(255) NULL COMMENT 'Custom varchar value 3' AFTER post_varchar2
I have no idea how to deal with this so if anyone has any ideas, please let me know
8 sam2kb Apr 20, 2010 08:09
- backup the database
- delete "post_titletag" column from phpmyadmin
- run the upgrade script again
You may need to delete all post_double and post_varchar columns too
9 tilqicom Apr 20, 2010 12:53
well that may fix it sam2kb, but that sounded like a bug candidate to me.. why is the upgrade script trying to insert existing columns again
10 sam2kb Apr 20, 2010 14:14
If you look into DB upgrade scripts you'll see that it makes checkpoints after each several queries.
In this particular case the code is as follows
if( $old_db_version < 9800 )
{ // 2.5.0
echo 'Upgrading blogs table... ';
db_drop_col( 'T_blogs', 'blog_commentsexpire' );
echo "OK.<br />\n";
echo 'Upgrading items table... ';
$DB->query( "ALTER TABLE T_items__item
CHANGE COLUMN post_urltitle post_urltitle VARCHAR(210) NULL DEFAULT NULL,
CHANGE COLUMN post_order post_order DOUBLE NULL,
ADD COLUMN post_titletag VARCHAR(255) NULL DEFAULT NULL AFTER post_urltitle,
ADD COLUMN post_double1 DOUBLE NULL COMMENT 'Custom double value 1' AFTER post_priority,
ADD COLUMN post_double2 DOUBLE NULL COMMENT 'Custom double value 2' AFTER post_double1,
ADD COLUMN post_double3 DOUBLE NULL COMMENT 'Custom double value 3' AFTER post_double2,
ADD COLUMN post_double4 DOUBLE NULL COMMENT 'Custom double value 4' AFTER post_double3,
ADD COLUMN post_double5 DOUBLE NULL COMMENT 'Custom double value 5' AFTER post_double4,
ADD COLUMN post_varchar1 VARCHAR(255) NULL COMMENT 'Custom varchar value 1' AFTER post_double5,
ADD COLUMN post_varchar2 VARCHAR(255) NULL COMMENT 'Custom varchar value 2' AFTER post_varchar1,
ADD COLUMN post_varchar3 VARCHAR(255) NULL COMMENT 'Custom varchar value 3' AFTER post_varchar2" );
echo "OK.<br />\n";
echo 'Creating keyphrase table... ';
$query = "CREATE TABLE T_track__keyphrase (
keyp_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
keyp_phrase VARCHAR( 255 ) NOT NULL,
PRIMARY KEY ( keyp_ID ),
UNIQUE keyp_phrase ( keyp_phrase )
)";
$DB->query( $query );
echo "OK.<br />\n";
echo 'Upgrading hitlog table... ';
$query = "ALTER TABLE T_hitlog
CHANGE COLUMN hit_ID hit_ID INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE COLUMN hit_datetime hit_datetime DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',
ADD COLUMN hit_keyphrase_keyp_ID INT UNSIGNED DEFAULT NULL AFTER hit_referer_dom_ID,
ADD INDEX hit_remote_addr ( hit_remote_addr ),
ADD INDEX hit_sess_ID ( hit_sess_ID )";
$DB->query( $query );
echo "OK.<br />\n";
echo 'Upgrading sessions table... ';
$DB->query( "ALTER TABLE T_sessions
ALTER COLUMN sess_lastseen SET DEFAULT '2000-01-01 00:00:00',
ADD COLUMN sess_hitcount INT(10) UNSIGNED NOT NULL DEFAULT 1 AFTER sess_key,
ADD KEY sess_user_ID (sess_user_ID)" );
echo "OK.<br />\n";
echo 'Creating goal tracking table... ';
$DB->query( "CREATE TABLE T_track__goal(
goal_ID int(10) unsigned NOT NULL auto_increment,
goal_name varchar(50) default NULL,
goal_key varchar(32) default NULL,
goal_redir_url varchar(255) default NULL,
goal_default_value double default NULL,
PRIMARY KEY (goal_ID),
UNIQUE KEY goal_key (goal_key)
)" );
$DB->query( "CREATE TABLE T_track__goalhit (
ghit_ID int(10) unsigned NOT NULL auto_increment,
ghit_goal_ID int(10) unsigned NOT NULL,
ghit_hit_ID int(10) unsigned NOT NULL,
ghit_params TEXT default NULL,
PRIMARY KEY (ghit_ID),
KEY ghit_goal_ID (ghit_goal_ID),
KEY ghit_hit_ID (ghit_hit_ID)
)" );
echo "OK.<br />\n";
set_upgrade_checkpoint( '9800' );
}
The script successfully ran the first 2 queries upgrading blogs and items tables, but for some reason died processing one of the remaining.
So next time when you access the script, it checks the checkpoint and starts running all these queries again.
Ideally b2evo should create upgrade checkpoints [u]after each query[/u]
11 seven_star Apr 20, 2010 19:53
I've got it installed now. The reason it was stopping at the checkpoint is because I upgraded in the past but didn't backup my database before the upgrade and when I went back to 2.4.7 after going to 3.3.1 the tables remained in the db. I had to drop these tables manually, it took some time but i got it done. I figured that is what I had to do but it kept repeating itself after I had finished dropping the ones listed, so it kept starting over with the same message.
If you have uploaded all the 3.3.1 files, including the "install" folder, then you simply type in your domain name Eg: http://www.yoursite.com/install and hit "enter"
Select "upgrade" and in seconds your presented with your Admin login.