2 -- Table to manage mails sent to users
5 CREATE TABLE #PFX#mails (
6 code SERIAL PRIMARY KEY,
7 ucode integer REFERENCES #PFX#users (code) ON DELETE cascade ON UPDATE cascade,
8 type integer, -- type of email
9 tstamp timestamp DEFAULT to_timestamp(0), -- insert time
10 subj text, -- email subject
11 body_txt text, -- email body (text version)
12 body_htm text, -- email body (html version)
13 hash text); -- reference hash to complete registration