roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r559956 - /roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm
Date Thu, 26 Jul 2007 19:52:09 GMT
Author: snoopdave
Date: Thu Jul 26 12:52:06 2007
New Revision: 559956

URL: http://svn.apache.org/viewvc?view=rev&rev=559956
Log:
Fixing ROL-1490 "Locale is a required field" when re-saving old entry by ensuring that every
entry has a valid local. Entries that have no locale are given locale of weblog.

Modified:
    roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm

Modified: roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm?view=diff&rev=559956&r1=559955&r2=559956
==============================================================================
--- roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm (original)
+++ roller/trunk/apps/weblogger/src/sql/310-to-400-migration.vm Thu Jul 26 12:52:06 2007
@@ -17,6 +17,13 @@
 );
 alter table rag_planet add constraint ragp_handle_uq unique ( handle );
 
+-- ensure that every weblog entry has a valid locale
+update weblogentry e set 
+   e.pubtime=pubtime, 
+   e.updatetime=updatetime, 
+   e.locale=(select locale from website where website.id=e.websiteid) 
+   where e.locale is null or length(e.locale)=0;
+
 -- add new planet_id column to planet group table
 #addColumnNull("rag_group" "planet_id" "varchar(48)")
 



Mime
View raw message