roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r356036 - /incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql
Date Sun, 11 Dec 2005 21:45:56 GMT
Author: bayard
Date: Sun Dec 11 13:45:54 2005
New Revision: 356036

URL: http://svn.apache.org/viewcvs?rev=356036&view=rev
Log:
fixing some bits for the 130->200 postgres migration

Modified:
    incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql

Modified: incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql?rev=356036&r1=356035&r2=356036&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql (original)
+++ incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql Sun
Dec 11 13:45:54 2005
@@ -14,14 +14,17 @@
 
 alter table website add column handle varchar(255);
 @ALTER_TABLE_WEBSITE_HANDLE_DEFAULT@;
+update website set handle='';
 @ALTER_TABLE_WEBSITE_HANDLE_NOT_NULL@;
 
 alter table website add column datecreated timestamp;
 @ALTER_TABLE_WEBSITE_DATECREATED_DEFAULT@;
+update website set datecreated='20050101';
 @ALTER_TABLE_WEBSITE_DATECREATED_NOT_NULL@;
 
 alter table website add column emailaddress varchar(255);
 @ALTER_TABLE_WEBSITE_EMAILADDRESS_DEFAULT@;
+update website set emailaddress='';
 @ALTER_TABLE_WEBSITE_EMAILADDRESS_NOT_NULL@;
 
 create index website_handle_index on website(handle);
@@ -34,24 +37,29 @@
 -- Add userid to weblogentry so we can track original creator of entry
 alter table weblogentry add column userid varchar(48);
 @ALTER_TABLE_WEBLOGENTY_USERID_DEFAULT@;
+update weblogentry set userid='';
 @ALTER_TABLE_WEBLOGENTY_USERID_NOT_NULL@;
 
 alter table weblogentry add column status varchar(20);
 @ALTER_TABLE_WEBLOGENTRY_STATUS_DEFAULT@;
+update weblogentry set status='';
 @ALTER_TABLE_WEBLOGENTRY_STATUS_NOT_NULL@;
 
 create index weblogentry_userid_index on weblogentry(userid);
 
 alter table rolleruser add column isenabled @BOOLEAN_SQL_TYPE@;
 @ALTER_TABLE_ROLLERUSER_ISENABLED_DEFAULT@;
+update rolleruser set isenabled=true;
 @ALTER_TABLE_ROLLERUSER_ISENABLED_NOT_NULL@;
 
 alter table rolleruser add column locale varchar(50);
 @ALTER_TABLE_ROLLERUSER_LOCALE_DEFAULT@;
+update rolleruser set locale='';
 @ALTER_TABLE_ROLLERUSER_LOCALE_NOT_NULL@;
 
 alter table rolleruser add column timezone varchar(50);
 @ALTER_TABLE_ROLLERUSER_TIMEZONE_DEFAULT@;
+update rolleruser set timezone='';
 @ALTER_TABLE_ROLLERUSER_TIMEZONE_NOT_NULL@;
 
 create index user_isenabled_index on rolleruser( isenabled );
@@ -94,11 +102,12 @@
 -- have to remove the "not null" clause here.
 alter table pingtarget add column conditioncode integer;
 @ALTER_TABLE_PINGTARGET_CONDITIONCODE_DEFAULT_0@;
+update pingtarget set conditioncode=0;
 @ALTER_TABLE_PINGTARGET_CONDITIONCODE_NOT_NULL@;
 
 -- Transfer old column data to the new column.  This is not critical as currently it is not
used, and
 -- later the data will be generated by usage in the ping processor.
-update pingtarget pt set pt.conditioncode=pt.condition;
+update pingtarget set conditioncode=condition;
 
 -- Drop the old column 
 -- Don't do this until you're sure you don't need to back-off to Roller 1.2



Mime
View raw message