ALTER TABLE ACADEMIC_SERVICE_REQUEST ADD COLUMN REQUEST_DATE TIMESTAMP;
UPDATE ACADEMIC_SERVICE_REQUEST, ACADEMIC_SERVICE_REQUEST_SITUATION SET ACADEMIC_SERVICE_REQUEST.REQUEST_DATE = ACADEMIC_SERVICE_REQUEST_SITUATION.CREATION_DATE WHERE ACADEMIC_SERVICE_REQUEST.ID_INTERNAL = ACADEMIC_SERVICE_REQUEST_SITUATION.KEY_ACADEMIC_SERVICE_REQUEST AND ACADEMIC_SERVICE_REQUEST_SITUATION.OJB_CONCRETE_CLASS = 'net.sourceforge.fenixedu.domain.serviceRequests.AcademicServiceRequestSituation' AND ACADEMIC_SERVICE_REQUEST_SITUATION.ACADEMIC_SERVICE_REQUEST_SITUATION_TYPE = 'NEW';

ALTER TABLE ACADEMIC_SERVICE_REQUEST_SITUATION DROP COLUMN ACADEMIC_SERVICE_REQUEST_SITUATION.KEY_UNIT;
