Author: snoopdave
Date: Thu Oct 11 11:54:07 2007
New Revision: 583914
URL: http://svn.apache.org/viewvc?rev=583914&view=rev
Log:
Fix to prevent upgrade from resetting comment posttimes
Modified:
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
Modified:
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
URL:
http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java?rev=583914&r1=583913&r2=583914&view=diff
==============================================================================
---
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
(original)
+++
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/startup/DatabaseInstaller.java
Thu Oct 11 11:54:07 2007
@@ -987,7 +987,7 @@
con.prepareStatement("select id,feed_url,author from
rag_subscription");
PreparedStatement updateSubUrl =
- con.prepareStatement("update rag_subscription set feed_url
= ? where id = ?");
+ con.prepareStatement("update rag_subscription set
last_updated=last_updated, feed_url = ? where id = ?");
ResultSet rset = selectSubs.executeQuery();
while (rset.next()) {
@@ -1084,14 +1084,14 @@
// set content-type for all existing comments
PreparedStatement updateCommentsContentType =
- con.prepareStatement("update roller_comment set
contenttype = ?");
+ con.prepareStatement("update roller_comment set
posttime=posttime, contenttype = ?");
updateCommentsContentType.clearParameters();
updateCommentsContentType.setString(1, contentType);
updateCommentsContentType.executeUpdate();
// set plugins for all existing comments
PreparedStatement updateCommentsPlugins =
- con.prepareStatement("update roller_comment set plugins =
?");
+ con.prepareStatement("update roller_comment set
posttime=posttime, plugins = ?");
updateCommentsPlugins.clearParameters();
updateCommentsPlugins.setString(1, plugins);
updateCommentsPlugins.executeUpdate();