Below is the SQL script for PostgreSQL that upgrades the schema from 0.9.12 to 1.0.0

-- This SQL script upgrades the database schema for manitou-mail
-- from 0.9.12 to 1.0.0 version

\set ON_ERROR_STOP 1

BEGIN;
ALTER TABLE body DROP COLUMN textsize;
ALTER TABLE body ADD bodyhtml TEXT;

ALTER TABLE header DROP COLUMN header_size;
ALTER TABLE mail DROP COLUMN msg_day;

ALTER TABLE mail RENAME attachments TO flags;
UPDATE mail SET flags=1 WHERE flags!=0;
UPDATE mail SET flags=flags|2 WHERE mail_id in (select mail_id from notes);

UPDATE runtime_info SET rt_value='1.0.0' WHERE rt_key='schema_version';

END
schema_1_0_0_upgrade.txt · Last modified: 2010/07/20 21:37 by daniel
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki