BEGIN;

ALTER TABLE contact_conference DROP CONSTRAINT contact_conference_contact_key;

ALTER TABLE contact_conference ADD UNIQUE (contact, conference, phoneline);

ALTER TABLE contact_conference ADD COLUMN phoneline integer NOT NULL default '1';

ALTER TABLE contact_conference ADD CONSTRAINT contact_conference_contact_constraint FOREIGN KEY (contact) REFERENCES contact (id);
ALTER TABLE contact_conference ADD CONSTRAINT contact_conference_conference_constraint FOREIGN KEY (conference) REFERENCES conference (id);
ALTER TABLE contact_conference ADD CONSTRAINT contact_conference_phoneline_constraint FOREIGN KEY (phoneline) REFERENCES phoneline (id);

COMMIT;
