DROP TABLE IF EXISTS ACADEMIC_SERVICE_REQUEST_SITUATION;
CREATE TABLE ACADEMIC_SERVICE_REQUEST_SITUATION (
  ID_INTERNAL INT(11) NOT NULL AUTO_INCREMENT,
  ACADEMIC_SERVICE_REQUEST_SITUATION_TYPE VARCHAR(250) NOT NULL,
  CREATION_DATE DATETIME NOT NULL,
  JUSTIFICATION TEXT NULL,
  KEY_EMPLOYEE INT(11) NOT NULL,
  KEY_ACADEMIC_SERVICE_REQUEST INT(11) NOT NULL,
  KEY_ROOT_DOMAIN_OBJECT INT(11) NOT NULL,
  PRIMARY KEY (ID_INTERNAL)
) TYPE=INNODB;

DROP TABLE IF EXISTS ACADEMIC_SERVICE_REQUEST;
CREATE TABLE ACADEMIC_SERVICE_REQUEST (
  ID_INTERNAL INT(11) NOT NULL AUTO_INCREMENT,
  OJB_CONCRETE_CLASS VARCHAR(250) NOT NULL,
  CREATION_DATE DATETIME NOT NULL,
  DOCUMENT_PURPOSE_TYPE VARCHAR(250) NULL,
  OTHER_DOCUMENT_PURPOSE_TYPE_DESCRIPTION TEXT NULL,
  URGENT_REQUEST TINYINT(1) NULL,
  NUMBER_OF_PAGES INT(11) NULL,
  AVERAGE TINYINT(1) NULL,
  KEY_CERTIFICATE_REQUEST_EVENT INT(11) NULL,
  KEY_STUDENT_CURRICULAR_PLAN INT(11) NOT NULL,
  KEY_ADMINISTRATIVE_OFFICE INT(11) NOT NULL,
  KEY_ROOT_DOMAIN_OBJECT INT(11) NOT NULL,
  PRIMARY KEY (ID_INTERNAL)
) TYPE=INNODB;
