On 9/25/07, Dave <[EMAIL PROTECTED]> wrote:
On 9/22/07, YOSHIDA Satoshi <[EMAIL PROTECTED]> wrote:
I have upgraded my roller from 3.11rc3 to 4.0 rc3 on Apache Tomcat
6.0.14 and MySQL 5.0.45.
issue 1:
After upgrade, the values of [posttime] in all entries in
[roller_comment] table have been changed to the upgrade time. This
trouble occurs in both 'auto' installation and 'manual' installation.
I can't duplicate this problem. There is a bug in the upgrade script
that prevented me from upgading from 3.1.1 to 4.0.
Once I fixed that bug I was able to upgrade and the dates of the
comments are preserved (I'm testing with MySQL 5.0.22).
I also checked the places where we update the comments table in the
3.1.1 to 4.0 migration script and they all do the right thing for
preserving the posttime.
I found out the cause of issue 1.
roller_comment.posttime should be defined as 'datetime not null'.
But my roller_comment.posttime was defined as 'timestamp NOT NULL
default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'.
My Roller DB was created when I was using Roller 2.02.
In Roller 2.02, roller_comment.posttime was defined as 'timestamp not
null' with createdb.sql of 2.02.
I am wondering when it changed to such definition...
Anyway, so roller_comment.posttime was automatically set to
CURRENT_TIMESTAMP when
"update roller_comment set contenttype = "text/html"" and
"update roller_comment set plugins = "HTMLSubset,AutoFormat""
were executed by DatabaseInstaller.
The other columns except roller_comment.posttime were also defined
incorrectly. I corrected them with the following script.
alter table rolleruser modify datecreated datetime NOT NULL;
alter table roller_audit_log modify change_time datetime;
alter table usercookie modify datecreated datetime NOT NULL;
alter table webpage modify updatetime datetime NOT NULL;
alter table website modify datecreated datetime NOT NULL;
alter table weblogentry modify updatetime datetime NOT NULL;
alter table roller_comment modify posttime datetime NOT NULL;
alter table pingtarget modify lastsuccess datetime;
alter table pingqueueentry modify entrytime datetime NOT NULL;
alter table referer modify reftime datetime;
alter table rag_subscription modify last_updated datetime;
Thanks,
Yossie