alter table `PARTY_CONTACT` add `OID_SPACE` bigint unsigned, add index (OID_SPACE);
update PARTY_CONTACT PC, SPACE_INFORMATION SI SET PC.OID_SPACE=SI.OID_SPACE WHERE PC.OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contacts.PhysicalDeliveryOfficeContact' AND PC.VALUE=SI.IDENTIFICATION;
delete from PARTY_CONTACT WHERE OJB_CONCRETE_CLASS='net.sourceforge.fenixedu.domain.contacts.PhysicalDeliveryOfficeContact' AND OID_SPACE IS NULL; 
