CREATE TABLE contact_conference (
 id serial,

 created timestamp with time zone not null default CURRENT_TIMESTAMP,
--HELP_EN_INFO:Creation Date
--HELP_EN_LONG:The date and time this record was created.
--HELP_NL_INFO:Datum aanmaak
--HELP_NL_LONG:De tijd en datum waarop dit is aangemaakt.

 lastupdate timestamp with time zone not null default CURRENT_TIMESTAMP,
--HELP_EN_INFO:Last Update
--HELP_EN_LONG:The date and time this record was updated.
--HELP_NL_INFO:Laatste wijziging
--HELP_NL_LONG:De tijd en datum van laatste wijziging.

 contact integer NOT NULL default '1',
--HELP_EN_INFO:
--HELP_EN_LONG:
--HELP_NL_INFO:
--HELP_NL_LONG:

 conference integer NOT NULL default '1',
--HELP_EN_INFO:
--HELP_EN_LONG:
--HELP_NL_INFO:
--HELP_NL_LONG:

 UNIQUE (contact, conference),
 PRIMARY KEY  (id)
);

GRANT UPDATE, SELECT, INSERT, DELETE ON contact_conference TO astium;
GRANT UPDATE, SELECT ON contact_conference_id_seq TO astium;

CREATE TRIGGER update_lastupdate_trigger BEFORE UPDATE ON contact_conference FOR EACH ROW EXECUTE PROCEDURE update_lastupdate_column();
