Index: openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-0.1a-0.2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/upgrade/Attic/upgrade-0.1a-0.2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-0.1a-0.2.sql 11 Jun 2003 10:38:13 -0000 1.1.2.1 @@ -0,0 +1,13 @@ +-- create the new query column as type 'text' +alter table bulk_mail_messages add column query2 text; + +alter table bulk_mail_messages alter column query2 set not null; + +-- update the rows +update bulk_mail_messages set query2 = query; + +-- drop the old column +alter table bulk_mail_messages drop column query cascade; + +-- rename the new column ot the correct name +alter table bulk_mail_messages rename column query2 to query;