
DROP TABLE IF EXISTS dbmail_envelope;
CREATE TABLE dbmail_envelope (
	physmessage_id	BIGINT NOT NULL,
	id		BIGINT NOT NULL AUTO_INCREMENT,
	envelope	TEXT NOT NULL,
	PRIMARY KEY (id),
	UNIQUE (physmessage_id, id),
	FOREIGN KEY (physmessage_id)
			REFERENCES dbmail_physmessage(id)
			ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB;

