ALTER TABLE postgresql.business_labour DROP FOREIGN KEY workcenter_labour; ALTER TABLE postgresql.business_labour ADD CONSTRAINT business_labour_FK FOREIGN KEY (workcenter_id) REFERENCES vn.workCenter(id) ON DELETE RESTRICT ON UPDATE CASCADE; RENAME TABLE postgresql.workcenter TO postgresql.workcenter__;