schema_1_0_0_upgrade
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | schema_1_0_0_upgrade [2010/07/20 19:37] (current) – created daniel | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | 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=' | ||
+ | |||
+ | END | ||
+ | </ | ||
schema_1_0_0_upgrade.txt · Last modified: 2010/07/20 19:37 by daniel