On Fri, 2004-07-16 at 17:18, Thomas Mueller wrote:
> Hi,
> 
> I've posted that for RC6 yet but got no response: I think we should
> provide scripts to migrate the database at least between RCs, better for
> every change in cvs.

True.

> 
> These are for postgres:
> ----------------------------------------------------------------------
> -- v1.28 -> v1.29
> BEGIN TRANSACTION;
> 
> ALTER TABLE messageblks ADD COLUMN is_header INT2;
> UPDATE messageblks SET is_header=0;
> ALTER TABLE messageblks ALTER COLUMN is_header SET DEFAULT '0';
> ALTER TABLE messageblks ALTER COLUMN is_header SET NOT NULL;
> 
> CREATE INDEX messageblks_physmessage_is_header_idx
>        ON messageblks(physmessage_id, is_header);
> 
> COMMIT;
> 
> -- v1.29 -> v1.30 no changes required
> 
> -- v1.30 -> v1.31
> BEGIN TRANSACTION;
> 
> ALTER TABLE mailboxes ALTER COLUMN permission SET NOT NULL;
> ALTER TABLE messages ALTER COLUMN status SET DEFAULT '0';
> CREATE INDEX messages_status_notdeleted_idx ON messages(status) WHERE
> status < '2';
> 
> ALTER TABLE pbsp DROP COLUMN ipnumber;
> ALTER TABLE pbsp ADD COLUMN ipnumber INET;
> ALTER TABLE pbsp ALTER COLUMN ipnumber SET DEFAULT '0.0.0.0';
> ALTER TABLE pbsp ALTER COLUMN ipnumber SET NOT NULL;
> 
> COMMIT;
> ----------------------------------------------------------------------
> 
> My pbsp table always has been empty that's why I've simply dropped it,
> might be a bad idea for others?

Dropping pbsp isn't really bad. It's only used for temporary stuff. The
only thing you could notice is that user's who have POPped before the
update will have to do that again to send mail (if your MTA is setup to
use pop-before-smtp using the pbsp table).

Ilja


Reply via email to