-- Add migration script here
CREATE TABLE alias (
	alias TEXT NOT NULL PRIMARY KEY,
	type mail_type NOT NULL CHECK (type = 'alias'),
	dest TEXT NOT NULL REFERENCES emails(mail),
	FOREIGN KEY (alias, type) REFERENCES emails (mail, type)
);
